Incorrect rendering of stencil shadow under Vista

Hi guys,

I have implemented Robust Stencil Shadow paper posted on NVIDIA’s website.

http://developer.nvidia.com/object/robust_shadow_volumes.html

My code works perfectly fine when I run it on XP with Intel media accelerator card. However when I run the same program on Vista 64 bit with NVIDIA GeForce 9200GE/PCI/SSE2 card shadows are not cast. Has anyone else faced similar problem?

When I run the program it shows following info: OpenGL version 3.0.0 Vender NVIDIA corporation Renderer GeForce 9200 M GE.

But when I copy the opengl32.dll shipped with XP into my programs folder on machine with Vista, it shows that OpenGL version as 1.1 Vendor as Microsoft and Renderer as GDI generic.

It is driving me crazy. :eek: Why is it behaving like that? I am not able to figure out why shadows are not cast. Whether it is Vista or opengl32.dll shipped with Vista or 64 bit operation system.

Its definitely a question for Opengl pundits!! :confused:

Thanks.

-Prasad

The version string shows that drivers are correctly installed on the Vista machine. Don’t copy opengl32.dll from one system to another, this is just plain wrong! :slight_smile:

Two possible causes of the problem: a driver bug (unlikely) or a bug in the program (more likely). What does glGetError() return? Try placing a few calls before, during and after the code in question.

some code (how you handling stencil shadows) would help.

Finally, after a lot of frustration I figured it out!

I am using Qt to develop my UI. I have to explicitly turn on stencil buffer for my QGLWidget for code to run correctly on Vista. How it was running correctly on XP is still a mystery to me.

[b]MainWindow::MainWindow()
{

    QGLFormat fmt;
fmt.setStencil(true); [b]//This was the culprit. It was set to false before.[/b]
fmt.setAlpha(true);
fmt.setDoubleBuffer(true);
fmt.setDepth(true);
fmt.setAccum(true);
fmt.setRgba(true);
QGLFormat::setDefaultFormat(fmt);

graphicsPanelPtr = new GraphicsPanel(); 

[/b]

Anyways, I am happy that its working now. Thanks to gDEbugger too. :smiley:

-Prasad

Either way, don’t put MS’ OpenGL32.dll in your program directory. It will cause your app to ignore the installed graphics driver, because when the DLLs referenced by the software are loaded, it first looks in the executable directory, and then in the \system\ or \system32\ (or whatever it is these days) directory.

(At least that’s how it is supposed to work, YMMV.)

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.