[SDL] OpenGl and Surface window parallel
brian.ripoff at gmail.com
Fri Jun 3 15:00:02 PDT 2005
SDL can only have 1 window / video surface.
the video surface is the only one that is shown on the screen or in a window
i assume your putPixel code is correct ( i use the version found in
the SDL documentation )
if you write to the SDL_Surface that is not the latest one you create
you will probably get a segfault.
it is undocumented but i assume thats because resetting the video mode
loses the original surface.
with a variable name like offscreen (i love sensible variable names)
it sounds like this surface is not used as the display:
may i suggest using SDL_CreateSurface( args... ).
and writing to / reading from it
or am i wrong in what you are attempting?
More information about the SDL