OpenGL implementation for multiple platform - SDL or GLUT or....

Started by
6 comments, last by guvidu 16 years, 5 months ago
Hi! Im doing a study and i want to ask you all for advices in what should i use. I know of GLUT and SDL but there may be other library there that i could use. i need to make an Opengl application that is multiplatform. this application is suppose to be a framework for futere games (2d and 3d) so.. can you guys tell me what library should i use? Thanks!
Advertisement
You can either use many of the cross-platform OpenGL toolkits, like SDL, GLUT, GLFW, etc, or you can make your own. The OpenGL part is not really hard to do, just change the code depending on the platform you're using, like:

#ifdef _WIN32//Windows#elif defined(__LINUX__)//Linux#elif defined(__APPLE__)//MacOS#endif


This way only the parts for the current platform are added.

Its just an idea, though. Like they say, if you cant fit a sweater, knit your own.
And as it says, i mean to only do that if you cant find a library to do it for you.

Good luck with your studies!
SDL and GLUT both do a good job for cross-platform OpenGL window handling. If I were you, I'd try both. They're both easy to implement.
There is also GLFW. I think it's a very nice framework for OpenGL, but I've only used it for small scale projects. Be sure to give it a glance.
If your looking for a windowing environment into opengl, I would HIGHLY suggest SDL. I've been using it for my stuff, and it's really easy to set up. Plus you've got Lazy Foo' to fall back on.

FlyingIsFun1217
I'd recommend SFML.
http://sfml.sourceforge.net/

Its C++ and really simple to setup and use.

Andy

"Ars longa, vita brevis, occasio praeceps, experimentum periculosum, iudicium difficile"

"Life is short, [the] craft long, opportunity fleeting, experiment treacherous, judgement difficult."

Use SDL library. It is a tried and proven library that has been used by many large game studios.
Thanks alot guys - unfortunatly i was kindoff obligated to use FLTK. :(

This topic is closed to new replies.

Advertisement