Sign in to follow this  

quick easy question about openGL.

This topic is 4549 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i've heard that openGL is a cross system. which means that it is for windows as well as linux and perhaps macs. now does this mean that if i write an openGL game for linux, if i take the code and compile it on a window's compiler it should compile without any problems, and run? i've been learning directX, but i don't really like it, and i'd rather use be able to have my games work on more then one os. thank you for your time.

Share this post


Link to post
Share on other sites
Ze thing about OpenGL is that yes it is cross platform but that is mainly because it does not provide any of its own window creation or user interaction code. As far as I know.

Share this post


Link to post
Share on other sites
If you use SDL (or anything else that is cross platform for making windows, reading from the keyboard, etc) then you can make your programs cross platform. If you code an OpenGL program using just the Win32 API, you'll be stuck on Windows.

Share this post


Link to post
Share on other sites
OpenGL in general (i.e. glBegin() ) is cross-platform, however each OS provides its own way of making windows render with OpenGL/load extensions - under Windows it's WGL, under X it's GLX. The WGL/GLX code and the windowing system code is likely all you'll need to change if you stick to other cross-platform code throughout your program.

For windowing/input, GLUT is a fairly simple way to do it. SDL, already mentioned, works too.

Hope it helps!

Share this post


Link to post
Share on other sites

This topic is 4549 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this