View Full Version : Stencil Buffer Won't Enable
08-11-2003, 09:27 AM
For whatever reason my stencil buffer won't enable. I call glEnable with GL_STENCIL_TEST and then do if glIsEnabled with GL_STENCIL_TEST != GL_TRUE then cout "asdf" and it always outputs "asdf" which would explain why none of the stencil buffer things I've been working with have been functional. Any reasons that this would happen?
Check what glGetInteger and GL_STENCIL_BITS returns. If it returns 0, I bet you forgot to ask for a stencil buffer when creating the pixel format.
08-11-2003, 09:58 AM
That seems to be the problem, However I'm using qgl, and I don't know how to request said bits in qgl. Does anyone?
08-11-2003, 12:54 PM
I got it. For future reference to this question, under QGL there's a class called QGLFormat that must be messed with to create every buffer except for the double and depth buffers. Create a QGLFormat, set flags with the set___(bool) calls and then call QGLFormat::setDefault() with your QGLFormat as the variable.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.