Re: SDL Inteface for POGL and macro refactor
[email protected] (chm) Sat, 01 Oct 2011 18:03:28 -0400
| Newsgroups | perl.sdl.devel |
|---|---|
| Message-ID | <[email protected]> |
On 10/1/2011 4:04 PM, Kartik Thakore wrote: > Hey Chris, > > How do I make SDL an interface for POGL? > > https://github.com/PerlGameDev/POGL/commit/4ed41515474f67cb2af553be9cf0132741594a40 > > I want to turn off GLUT and all that when SDL is chosen. The easiest way it to just ignore the glut stuff. The current build uses GLUT/FreeGLUT to build but after that you can use all the OpenGL and GLU stuff independent of your choice for window/context creation. My current plan is to refactor the POGL build to use GLEW (or GLee) to generate the OpenGL bindings and to implement some convenience routines/methods to simplify use of the routines from other GUIs and their window+context environments. I thought SDL already had support for creating windows with OpenGL contexts in them? If so you just create the context and then use the POGL bindings to the OpenGL API to do your drawing... > Also in the TODO I noticed you wanted: > > >> https://github.com/PerlGameDev/POGL/blob/SDL_interface/TODO#L28 > > common macro in one place. > > In SDL we put this in one header, would that work? Yes, but the challenge is the legacy code and untangling the various macro constructs and reordering which not breaking anything. I've started to look at the GLEW stuff and I think some of the mess will go away with the new approach (e.g., all constants will be real perl constants, and all bindings will be generated from the core GLEW headers which should help keep things up-to-date and error free). What do you need to do that you cannot already do with SDL+POGL OpenGL? --Chris