Results 1 to 4 of 4

Thread: Stencil Buffer Won't Enable

  1. #1
    Member Newbie
    Join Date
    Jul 2003
    Posts
    42

    Stencil Buffer Won't Enable

    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?

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    2,978

    Re: Stencil Buffer Won't Enable

    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.

  3. #3
    Member Newbie
    Join Date
    Jul 2003
    Posts
    42

    Re: Stencil Buffer Won't Enable

    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?

  4. #4
    Member Newbie
    Join Date
    Jul 2003
    Posts
    42

    Re: Stencil Buffer Won't Enable

    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.

Similar Threads

  1. Replies: 1
    Last Post: 09-11-2013, 11:35 AM
  2. copy app generated stencil data to stencil buffer
    By guilder in forum OpenGL: Basic Coding
    Replies: 7
    Last Post: 12-23-2010, 06:46 PM
  3. How to enable opengl quad buffer in my programme?
    By PeterX in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 05-15-2010, 01:13 AM
  4. How do you enable a w-buffer?
    By CGameProgrammer in forum OpenGL: Advanced Coding
    Replies: 26
    Last Post: 04-23-2002, 11:17 PM
  5. problem on Enable buffer
    By dy1217 in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 07-18-2000, 05:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean