[gameprogrammer] Re: Optimizing opengl rendering

On Tuesday 05 April 2005 19.05, tobias.langner@xxxxxxxxxxx wrote:
[...]
> I'm just curious - how is this wrapper called?

To use the (old, deprecated) wrapper, you basically include "glSDL.h" 
instead of "SDL.h" and then use the SDL API as usual. glSDL.h is a 
quick'n'dirty hack that redirects some SDL calls to glSDL_*() 
replacements. These replacements are defined in glSDL.c, which you 
have to compile and link to your application, one way or another.

glSDL/backend hooks into the internals of SDL, just like any other 
video backend. No difference to applications, except for a shortcut 
to activate it; the SDL_GLSDL flag that you can pass to 
SDL_SetVideoMode(). It's also possible to force glSDL upon 
applications that don't explicitly support it, by means of an 
environment variable.


> Is it Open Source?

Yep. LGPL, just like SDL. (It was intended to become an SDL backend 
from the start, provided it turned out well enough.)


> Where can you read the docs?

The API is the usual SDL API for both "flavors" of glSDL.

However, due to limitations of OpenGL and the SDL API, there are some 
pitfalls to avoid. There is some information about how to maximize 
performance with glSDL on this site:

 http://icps.u-strasbg.fr/~marchesin/sdl/glsdl.html

Most of the information on that site actually applies to h/w 
accelerated SDL backends in general; not just glSDL. It's just that 
due to the nature of OpenGL, some of these things can have severe 
impact on performance with glSDL, while not being all that serious 
with most other backends. ("Directly" accessing the screen would be 
one example.)


//David Olofson - Programmer, Composer, Open Source Advocate

.- Audiality -----------------------------------------------.
|  Free/Open Source audio engine for games and multimedia.  |
| MIDI, modular synthesis, real time effects, scripting,... |
`-----------------------------------> http://audiality.org -'
   --- http://olofson.net --- http://www.reologica.se ---


---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html


Other related posts: