Jump to content
  • Advertisement
Sign in to follow this  
CJWR

quick easy question about openGL.

This topic is 4858 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
Advertisement
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
hmm, interesting, i think i'll leave directx after the game i'm working on now then and try opengl/sdl. thank you.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!