Hi J-S,

It looks bit like the issue I strrugled with. I am not sure if my
workaround - repeating makeCurrent - was added before 2.4 release or after
it. Certainly 2.2 is not safe.

You may check if bool GraphicsWindowWin32::makeCurrentImplementation() looks
like this:


bool GraphicsWindowWin32::makeCurrentImplementation()
{
    if (!_realized)
    {
        reportErrorForScreen("GraphicsWindowWin32::makeCurrentImplementation
() - Window not realized; cannot do makeCurrent.", _traits->screenNum, 0);
        return false;
    }

    // 2008/05/12
    // Workaround for Bugs in NVidia drivers for windows XP / multithreaded
/ dualview / multicore CPU
    // affects GeForce 6x00, 7x00, 8x00 boards (others were not tested)
driver versions 174.xx - 175.xx
    // pre 174.xx had other issues so reverting is not an option
(statitistics, fbo)
    // drivers release 175.16 is the latest currently available
    //
    // When using OpenGL in threaded app ( main thread sets up context /
renderer thread draws using it )
    // first wglMakeCurrent seems to not work right and screw OpenGL context
driver data:
    // 1: succesive drawing shows a number of artifacts in TriangleStrips
and TriangleFans
    // 2: weird behaviour of FramBufferObjects (glGenFramebuffer generates
already generated ids ...)
    // Looks like repeating wglMakeCurrent call fixes all these issues
    // wglMakeCurrent call can impact performance so I try to minimize
number of
    // wglMakeCurrent calls by checking current HDC and GL context
    // and repeat wglMakeCurrent only when they change for current thread

    if( ::wglGetCurrentDC() != _hdc ||
        ::wglGetCurrentContext() != _hglrc )
    {
        if (!::wglMakeCurrent(_hdc, _hglrc))
        {
            reportErrorForScreen("GraphicsWindowWin32::makeCurrentImplementa
tion() - Unable to set current OpenGL rendering context",
_traits->screenNum, ::GetLastError());
            return false;
        }
    }

    if (!::wglMakeCurrent(_hdc, _hglrc))
    {
        reportErrorForScreen("GraphicsWindowWin32::makeCurrentImplementation
() - Unable to set current OpenGL rendering context", _traits->screenNum,
::GetLastError());
        return false;
    }

    return true;
}



Cheers,
Wojtek Lewandowski

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of
Jean-Sébastien Guay
Sent: Thursday, July 10, 2008 8:56 PM
To: OpenSceneGraph Users
Subject: [osg-users] Weird driver problems?


Hello,

We've started seeing something weird on some of our machines, and I'd
just like to know if someone else has seen this. These issues started
happening today.

Setup: Windows XP, GeForce 7800 GTX and 8800 GT, OSG 2.2 and 2.4, two
screens in Dual View mode.

Issues:
1. Starting osgviewer with any model gives weird geometry problems
(large polygons sticking out, see screenshot)
2. Our own apps (still using OSG 2.2) crash on start, when drawing the
first frame, and it appears that it crashes in the graphics driver
(nvoglnt.dll).

The weird thing: switching from Dual View mode to Horizontal Span mode
"fixes" both these issues.

Our current theory is that some automatic windows update that got
installed a day or two ago changed something that caused a new bug
related to the graphics driver. Perhaps a threading mode change, or
whatever. The people who have disabled automatic updates don't have the
problem, so there seems to be a correlation. If that's right, the next
NVidia driver version might magically fix it (by working around the new
bug).

Has anyone else seen this?

J-S
--
______________________________________________________
Jean-Sebastien Guay    [EMAIL PROTECTED]
                                http://www.cm-labs.com/
                         http://whitestar02.webhop.org/

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to