Archived

This topic is now archived and is closed to further replies.

karx11erx

depth and stencil buffer in SDL?

Recommended Posts

Hi, how do I specify depth and stencil buffer depth to SDL? Afaik they have to be set in the pixel format descriptor passed to SetPixelFormat(), but that is buried deep within the SDL code and not described in the SDL documentation (not that I could find it).

Share this post


Link to post
Share on other sites
You may want to check out this page, for the SDL_GL_SetAttribute function.

http://sdldoc.csn.ul.ie/sdlglsetattribute.php

One of the attributes you can set is SDL_GL_STENCIL_SIZE. Try setting it to 8, and your depth buffer bits to 24.

Hope this helps,

Pete


Why you shouldn''t use iostream.h - ever! | A Good free online C++ book

Share this post


Link to post
Share on other sites