Archived

This topic is now archived and is closed to further replies.

weird problems using stenciling

This topic is 5750 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi! I''m currently coding a little demo using OpenGL. At the moment I''m displaying quite a number of polygons using lighting, depth-buffering and blending. I checked the speed of my demo and got round about 50 FPS. That''s okay for my needs. BUT then I started to add one mirror to my scene (referring to the very good tutorial #27). I used exactly the same source as quoted in the tutorial. But if I just call glEnable(GL_STENCIL_TEST) and nothing else my demo gets slow as hell (about 1 FPS) - AND I''ve the same speed problem when calling the compiled exe from tutorial #27. I think OpenGL is just falling back to software rendering. But why? I''m using a ELSA Erazor III LT (NVIDIA RIVA TNT2 M64 chipset) with the lastest drivers (I tried the ELSA drivers and currently I''m running the NVIDIA reference drivers). According to ELSA, to my graphics card documentation and to serveral internet sites, my graphics card has full 8-bit hardware stenciling support. I''m rather helpless. Is there any testing utility to check my drivers. Does anybody know a solution for my problem. Please help me!

Share this post


Link to post
Share on other sites
I cannot solve your problem, but I''d just like to say that I have the same problem. I''ve noticed that the slow down is worse when you are close to an object that you are using the stencil buffer on. I''ve heard somewhere that currently most graphics cards do not have a hardware stencil buffer, but I do not know if this is still true.

-Weasalmongler

Share this post


Link to post
Share on other sites
quote:
Original post by weasalmongler
I cannot solve your problem, but I''d just like to say that I have the same problem. I''ve noticed that the slow down is worse when you are close to an object that you are using the stencil buffer on. I''ve heard somewhere that currently most graphics cards do not have a hardware stencil buffer, but I do not know if this is still true.

-Weasalmongler


In the meantime I got an answer in another thread. My problem (and may be yours too) can be solved by setting 32 bit color buffer, 24 bit depth buffer and 8 bit stencil buffer. BUT I don''t know if this is the only way to get stenciling work. I have no idea on how enumerating all pixelformats having a REAL hardware stenciling support. I''m currently running simply through all available pixelformats and checking for hardware rendering (absence of flags PFD_GENERIC_FORMAT and PFD_GENERIC_ACCELERATED) and anything with at least 16 bit color, 16 bit depth and 8 bit stencil. BUT obviously this didn''t work. An alternative solution... I hope I''ll find one. Otherwise I would have to force the users to 32 BPP - and that can be a problem in windowed mode...

Share this post


Link to post
Share on other sites
quote:
Original post by weasalmongler
I cannot solve your problem, but I''d just like to say that I have the same problem. I''ve noticed that the slow down is worse when you are close to an object that you are using the stencil buffer on. I''ve heard somewhere that currently most graphics cards do not have a hardware stencil buffer, but I do not know if this is still true.

-Weasalmongler


In the meantime I got an answer in another thread. My problem (and may be yours too) can be solved by setting 32 bit color buffer, 24 bit depth buffer and 8 bit stencil buffer. BUT I don''t know if this is the only way to get stenciling work. I have no idea on how enumerating all pixelformats having a REAL hardware stenciling support. I''m currently running simply through all available pixelformats and checking for hardware rendering (absence of flags PFD_GENERIC_FORMAT and PFD_GENERIC_ACCELERATED) and anything with at least 16 bit color, 16 bit depth and 8 bit stencil. BUT obviously this didn''t work. An alternative solution... I hope I''ll find one. Otherwise I would have to force the users to 32 BPP - and that can be a problem in windowed mode...

Share this post


Link to post
Share on other sites