OpenGL, I/O, and buttons
Moderator: PC Supremacists
- MadPumpkin
- Chaos Rift Maniac
- Posts: 484
- Joined: Fri Feb 13, 2009 4:48 pm
- Current Project: Octopia
- Favorite Gaming Platforms: PS1-3, Genesis, Dreamcast, SNES, PC
- Programming Language of Choice: C/++,Java,Py,LUA,XML
- Location: C:\\United States of America\Utah\West Valley City\Neighborhood\House\Computer Desk
OpenGL, I/O, and buttons
Does anyone know what probably the best I/O is to use with OpenGL that is NOT OS dependent? And also, what method do you all use for clickable buttons, I've been having problems making it simple.
While Jesus equipped with angels, the Devil's equipped with cops
For God so loved the world that he blessed the thugs with rock
For God so loved the world that he blessed the thugs with rock
- Milch
- Chaos Rift Junior
- Posts: 241
- Joined: Sat Jul 11, 2009 5:55 am
- Programming Language of Choice: C++
- Location: Austria, Vienna
Re: OpenGL, I/O, and buttons
I think SDL and SFML is what you're looking for, but unfortunately there is no "pure" I/O and window creating lib that I know of.
SDL/SFML have soo much unnecessary stuff in it that you simply don't use if you just want I/O and window creating.
SDL/SFML have soo much unnecessary stuff in it that you simply don't use if you just want I/O and window creating.
Follow me on twitter!
- Ginto8
- ES Beta Backer
- Posts: 1064
- Joined: Tue Jan 06, 2009 4:12 pm
- Programming Language of Choice: C/C++, Java
Re: OpenGL, I/O, and buttons
SFML is very modular, so you can make it so that you only use windowing, and don't use (and therefore get the overhead from) the parts of the library you don't want to.
Quit procrastinating and make something awesome.
Ducky wrote:Give a man some wood, he'll be warm for the night. Put him on fire and he'll be warm for the rest of his life.
- Milch
- Chaos Rift Junior
- Posts: 241
- Joined: Sat Jul 11, 2009 5:55 am
- Programming Language of Choice: C++
- Location: Austria, Vienna
Re: OpenGL, I/O, and buttons
Trust me, it is not as modular as it sounds at the first moment.
I've tried splitting it up into different DLLs and ended up having to link most of the stuff inside the main exe anyway.
I've tried splitting it up into different DLLs and ended up having to link most of the stuff inside the main exe anyway.
Follow me on twitter!
- ismetteren
- Chaos Rift Junior
- Posts: 276
- Joined: Mon Jul 21, 2008 4:13 pm
Re: OpenGL, I/O, and buttons
http://en.wikipedia.org/wiki/Object_Ori ... put_System i think this is "pure" io. I have never used it directly, but it was a dependency for something i worked on. Maybe this is what you are looking for.Milch wrote:I think SDL and SFML is what you're looking for, but unfortunately there is no "pure" I/O and window creating lib that I know of.
SDL/SFML have soo much unnecessary stuff in it that you simply don't use if you just want I/O and window creating.
Edit:
More direct link: http://sourceforge.net/projects/wgois/
- Falco Girgis
- Elysian Shadows Team
- Posts: 10294
- Joined: Thu May 20, 2004 2:04 pm
- Current Project: Elysian Shadows
- Favorite Gaming Platforms: Dreamcast, SNES, NES
- Programming Language of Choice: C/++
- Location: Studio Vorbis, AL
- Contact:
Re: OpenGL, I/O, and buttons
As long as whatever your targetted platform/architecture is has a proper implementation of the C and C++ standard libraries, both of those are "platform independent."MadPumpkin wrote:Does anyone know what probably the best I/O is to use with OpenGL that is NOT OS dependent? And also, what method do you all use for clickable buttons, I've been having problems making it simple.
Use either the fscanf(), fprintf(), etc series with C or fstreams with C++.
- dandymcgee
- ES Beta Backer
- Posts: 4709
- Joined: Tue Apr 29, 2008 3:24 pm
- Current Project: https://github.com/dbechrd/RicoTech
- Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
- Programming Language of Choice: C
- Location: San Francisco
- Contact:
Re: OpenGL, I/O, and buttons
I'm pretty sure he means user I/O, not file I/O.GyroVorbis wrote:As long as whatever your targetted platform/architecture is has a proper implementation of the C and C++ standard libraries, both of those are "platform independent."MadPumpkin wrote:Does anyone know what probably the best I/O is to use with OpenGL that is NOT OS dependent? And also, what method do you all use for clickable buttons, I've been having problems making it simple.
Use either the fscanf(), fprintf(), etc series with C or fstreams with C++.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches!
- Falco Girgis
- Elysian Shadows Team
- Posts: 10294
- Joined: Thu May 20, 2004 2:04 pm
- Current Project: Elysian Shadows
- Favorite Gaming Platforms: Dreamcast, SNES, NES
- Programming Language of Choice: C/++
- Location: Studio Vorbis, AL
- Contact:
Re: OpenGL, I/O, and buttons
DOH!dandymcgee wrote:I'm pretty sure he means user I/O, not file I/O.GyroVorbis wrote:As long as whatever your targetted platform/architecture is has a proper implementation of the C and C++ standard libraries, both of those are "platform independent."MadPumpkin wrote:Does anyone know what probably the best I/O is to use with OpenGL that is NOT OS dependent? And also, what method do you all use for clickable buttons, I've been having problems making it simple.
Use either the fscanf(), fprintf(), etc series with C or fstreams with C++.
Re: OpenGL, I/O, and buttons
ROFL.GyroVorbis wrote:DOH!dandymcgee wrote:I'm pretty sure he means user I/O, not file I/O.GyroVorbis wrote:As long as whatever your targetted platform/architecture is has a proper implementation of the C and C++ standard libraries, both of those are "platform independent."MadPumpkin wrote:Does anyone know what probably the best I/O is to use with OpenGL that is NOT OS dependent? And also, what method do you all use for clickable buttons, I've been having problems making it simple.
Use either the fscanf(), fprintf(), etc series with C or fstreams with C++.
If you mean I/O as GUI then you would probably be best just writing a GUI system yourself
for example
Code: Select all
class Button {
public:
Button();
~Button();
bool IsMouseHover() {
if ( IsCollision(GetMouseRect(),Pos) ) {
return true;
}
return false;
}
bool IsClicked() {
if ( IsCollision(GetMouseRect(),Pos) ) {
if ( GetMouseState() == LEFT_CLICK ) {
return true;
}
}
return false;
}
void Render() {
// Draw your button here
}
private:
Rectangle Pos;
};
- MadPumpkin
- Chaos Rift Maniac
- Posts: 484
- Joined: Fri Feb 13, 2009 4:48 pm
- Current Project: Octopia
- Favorite Gaming Platforms: PS1-3, Genesis, Dreamcast, SNES, PC
- Programming Language of Choice: C/++,Java,Py,LUA,XML
- Location: C:\\United States of America\Utah\West Valley City\Neighborhood\House\Computer Desk
Re: OpenGL, I/O, and buttons
Alright thanks everyone, and thank you N64vSNES for your way it's plenty simple haha.
I'm quite familiar with SDL but not at all with SFML. I've heard lots of good things about SFML though. What are the differences between SFML and SDL?Milch wrote:I think SDL and SFML is what you're looking for, but unfortunately there is no "pure" I/O and window creating lib that I know of.
SDL/SFML have soo much unnecessary stuff in it that you simply don't use if you just want I/O and window creating.
While Jesus equipped with angels, the Devil's equipped with cops
For God so loved the world that he blessed the thugs with rock
For God so loved the world that he blessed the thugs with rock
- dandymcgee
- ES Beta Backer
- Posts: 4709
- Joined: Tue Apr 29, 2008 3:24 pm
- Current Project: https://github.com/dbechrd/RicoTech
- Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
- Programming Language of Choice: C
- Location: San Francisco
- Contact:
Re: OpenGL, I/O, and buttons
To be honest, not many. I'd recommend SFML over SDL to a newbie, but if you're familiar with SDL already the benefits are minimal. SFML's 2D rendering capabilities are superior, and it has a few helper classes (ie. Sprite) similar to XNA.MadPumpkin wrote:What are the differences between SFML and SDL?
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches!
- MadPumpkin
- Chaos Rift Maniac
- Posts: 484
- Joined: Fri Feb 13, 2009 4:48 pm
- Current Project: Octopia
- Favorite Gaming Platforms: PS1-3, Genesis, Dreamcast, SNES, PC
- Programming Language of Choice: C/++,Java,Py,LUA,XML
- Location: C:\\United States of America\Utah\West Valley City\Neighborhood\House\Computer Desk
Re: OpenGL, I/O, and buttons
Oh alright, any rendering is pointless then actually xD I'm using OpenGL for rendering anyways.dandymcgee wrote:To be honest, not many. I'd recommend SFML over SDL to a newbie, but if you're familiar with SDL already the benefits are minimal. SFML's 2D rendering capabilities are superior, and it has a few helper classes (ie. Sprite) similar to XNA.MadPumpkin wrote:What are the differences between SFML and SDL?
While Jesus equipped with angels, the Devil's equipped with cops
For God so loved the world that he blessed the thugs with rock
For God so loved the world that he blessed the thugs with rock
- Milch
- Chaos Rift Junior
- Posts: 241
- Joined: Sat Jul 11, 2009 5:55 am
- Programming Language of Choice: C++
- Location: Austria, Vienna
Re: OpenGL, I/O, and buttons
Actually, SFML uses OpenGL to render stuff and SDL only uses software.
So thats a big difference!
So thats a big difference!
Follow me on twitter!
- dandymcgee
- ES Beta Backer
- Posts: 4709
- Joined: Tue Apr 29, 2008 3:24 pm
- Current Project: https://github.com/dbechrd/RicoTech
- Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
- Programming Language of Choice: C
- Location: San Francisco
- Contact:
Re: OpenGL, I/O, and buttons
No it's not because he's using OpenGL for rendering.Milch wrote:Actually, SFML uses OpenGL to render stuff and SDL only uses software.
So thats a big difference!
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches!