Compiling and running under Windows and Linux

Started by
12 comments, last by okonomiyaki 20 years, 3 months ago
Very cool.. then I have one last question. How far do I have to integrate it with my program? Do I *have* to flip the buffers with SDL and not glSwapBuffers now? I set up my window with SDL but any drawing with OpenGL does not work.
Advertisement
quote:Original post by okonomiyaki
Very cool.. then I have one last question. How far do I have to integrate it with my program? Do I *have* to flip the buffers with SDL and not glSwapBuffers now? I set up my window with SDL but any drawing with OpenGL does not work.


Yes. If you create an OpenGL window with SDL, you must call SDL_GL_SwapBuffers() to flip. I would recommend encapsulating it into an inlined Flip() routine, perhaps with conditional compilation if you plan on supporting non-SDL builds.

Josh
vertexnormal AT linuxmail DOT org

Check out Golem: Lands of Shadow, an isometrically rendered hack-and-slash inspired equally by Nethack and Diablo.
The guys at Loki also help to write a book on how to program games for linux using SDL, OpenGL, OpenAl, and some other cool stuff. The book is really well written and they put it online for people to use. Check it out here:

entire book

cheers,

Bob




----------------------------------
Halfway down the trail to hell...

[size="3"]Halfway down the trail to Hell...
Thanks a lot guys got it working with input and everything.. not too hard

This topic is closed to new replies.

Advertisement