Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: Is it possible to change the stencil buffer bits in the application based on MFC?

  1. #1
    Newbie Newbie
    Join Date
    Jan 2013
    Posts
    2

    Is it possible to change the stencil buffer bits in the application based on MFC?

    I maked OpenGL program by using MFC and in this program I used stencil buffer that the size is 8bit.
    I want to raise the stencil buffer bit size to 16bit.
    Is it possible?
    I want to know whether it is possible to change the opengl stencil buffer bit size.
    And how it does?

    Thanks.
    Last edited by ansheng; 02-19-2013 at 12:57 AM. Reason: Error

  2. #2
    Senior Member OpenGL Pro BionicBytes's Avatar
    Join Date
    Mar 2009
    Location
    UK, London
    Posts
    1,170
    The answer is "it depends".
    It depends upon your hardware and drivers as to whether it supports 16-bit stencil buffers. Typically, AMD and nVidia only support 8-bit stencil buffers.
    You select the number of stencil bits for your back buffer when you create the main window, you first query the device and then select the closest match (on Windows anyway) - via wglChoosePixelFormatARB

  3. #3
    Newbie Newbie
    Join Date
    Jan 2013
    Posts
    2
    Dear BionicBytes!
    I'm appreciate for your help.
    Thanks.

    What's kind of device supports the 16-bit stencil buffer? Could you tell me about this?

  4. #4
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,948
    I don't know of any that do. Certainly no consumer hardware supports greater-than-8-bits of stencil.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •