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: stencil HW acceleration detection

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2004
    Location
    Czech Republic
    Posts
    10

    stencil HW acceleration detection

    hi, I just
    read forum topics on hw accel. and from I read it seems that there's no way to detect
    if the stenciling (stencil buffer and stencil test) is accelerated in hardware ?

    Am I wrong ? What would be the best to determine if the stencil is done in HW ?
    Some kind of benchmark ? It's tricky feature, cause I found, that new nvidias and atis have them, but for ex. geforce 2 doesn't (even with yesterday's driver), but some old onboard graphics chip Sis XX with 8 MB of memory can do stencil in HW.

  2. #2
    Junior Member Regular Contributor
    Join Date
    Nov 2003
    Location
    Michigan, USA
    Posts
    188

    Re: stencil HW acceleration detection

    The best way to handle these things is to run a mini demo on init and find the framerate/performance. Then based on this test you can determine if you wish to run the stencil buffer. Of course, you do not have to show the demo running.

  3. #3
    Senior Member OpenGL Pro
    Join Date
    Feb 2002
    Location
    Bonn, Germany
    Posts
    1,652

    Re: stencil HW acceleration detection

    Originally posted by tachyon_eagle:
    hi, I just
    read forum topics on hw accel. and from I read it seems that there's no way to detect
    if the stenciling (stencil buffer and stencil test) is accelerated in hardware ?
    Correct.
    Am I wrong ? What would be the best to determine if the stencil is done in HW ?
    Some kind of benchmark ? It's tricky feature, cause I found, that new nvidias and atis have them, but for ex. geforce 2 doesn't (even with yesterday's driver), but some old onboard graphics chip Sis XX with 8 MB of memory can do stencil in HW.
    Geforce 2 does support stenciling. You're most likely in a 16 bit display mode. That won't work. In this mode, you'll only get 16 bit color and 16 bit z buffers, but no stencil (for memory alignment reasons, most likely). If you want a stencil buffer, you should switch to a 32 bpp display mode. There you can have 32 bpp color (rgb + destination alpha), 24 bit z and 8 bit stencil.

    Modeswitches in Windows are done with the ChangeDisplaySettings functions. Look it up on MSDN, it's quite easy to use

  4. #4
    Junior Member Newbie
    Join Date
    Jan 2004
    Location
    Czech Republic
    Posts
    10

    Re: stencil HW acceleration detection

    thanks a lot,
    my code just used the glut call to init the graphics mode, so I've trusted it to find mode with stencil, but maybe it cannot create it in windowed mode, if it's not possible.

Posting Permissions

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