[SDL] [DEMO] Minimal world engine in SDL+OpenGL

Daniel Phillips phillips at arcor.de
Wed Jan 22 15:26:01 PST 2003

On Wednesday 22 January 2003 23:53, Santeri Hernejärvi wrote:
> Daniel Phillips wrote:
> > ...It seems that SDL+OpenGL is
> > only going to start up on a wide range of hardware if you don't specify
> > any GL_SetAttributes at all.  Just comment them all out and I guess it
> > will start, but you will likely have a sucky 16 bit zbuffer.  Please try
> > uncommenting just the SDL_GL_DEPTH_SIZE line to get a 32 bit zbuffer and
> > see if it starts.
> You have to request a 24 bit color to get 32 bit depth, and optionally,
> 8 bit stencil.

Nice theory, but it doesn't hold here.  I set each of (SDL_GL_) RED, GREEN 
and BLUE to 8 and BUFFER_SIZE to 24 and still fail to get a "matching visual" 
on my test machine if DEPTH_SIZE is 32 instead of 16.  Good thing too, 
because such a coupling of unrelated attributes would be perverse.  There is 
no reason to stop searching for the real culprit.  There is no question 
there's a culprit: as a software renderer, Mesa is capable of setting up 
whichever depths it chooses.



More information about the SDL mailing list