Results 1 to 7 of 7

Thread: stencil buffer

  1. #1
    Member Contributor
    Join Date
    Oct 2002
    Posts
    55

    stencil buffer

    hello,

    how can i check if my graphic card support a stencil buffer?

    can i do this with:

    glGetIntegerv(GL_STENCIL_BITS, &stencil);

    because when i print the integer stencil the value is 0.

    thanks

    helda

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Oct 2000
    Location
    Fargo, ND
    Posts
    1,753

    Re: stencil buffer

    How do you create your window? Your probably didn't create a window that has a stencil buffer. If you're using Win32, there's a cStencilBits field in the PIXELFORMATDESCRIPTOR struct that you use. If you are using glut, you use GLUT_STENCIL for one of the options in the glutInitDisplayMode function.

    [This message has been edited by Deiussum (edited 11-06-2002).]
    Deiussum
    Software Engineer and OpenGL enthusiast

  3. #3
    Member Contributor
    Join Date
    Oct 2002
    Posts
    55

    Re: stencil buffer

    o **** i'm so stupid, thank you for that tip.

  4. #4
    Junior Member Newbie
    Join Date
    Nov 2002
    Location
    Istabul/Izmır
    Posts
    11

    Re: stencil buffer

    hmmmm anyone have any idea why stencil buffer might be slow??I tried it with 16,8,4,2,1 bits but its always slow like hell.My comp is a p4 1.4 with a gforce 2mx 400 64 ram and 256 mgs of memory O_o.
    And one thing i noticed is that it gets faster when the object that is rendered into the stencil buffer get away from the camera.
    Omnium rerum principia parva sunt.

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

    Re: stencil buffer

    Are you asking for a stencil buffer in 16 bit color depth? If so, you're not getting hardware accelerated rendering. Stencil buffers are only supported in 32 bit color depth on the earlier GeForce series.

  6. #6
    Junior Member Newbie
    Join Date
    Nov 2002
    Location
    Istabul/Izmır
    Posts
    11

    Re: stencil buffer

    So i need to set color depth to 32 and what about the stencil bit??Does that matter much?
    Omnium rerum principia parva sunt.

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

    Re: stencil buffer

    Stencil should be 8 bits. And I suppose it matters much; software vs hardware renering.

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. Coping from FBO's stencil to main stencil buffer ?
    By gregory_x in forum OpenGL: Advanced Coding
    Replies: 6
    Last Post: 08-30-2010, 01:09 AM
  4. Depth buffer and stencil buffer / Alpha test
    By greg2 in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 08-05-2004, 01:50 AM
  5. How to clear stencil buffer after stencil test?
    By in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 06-14-2003, 09:04 AM

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