David

> Producer::WGLExtentions: Could not create and initialize the temporary
> window

A failure at this point is "Goodnight Vienna". It looks like OpenGL is
broken in your environment.

I suggest that you hack up a little console app in VC and stick the
following in main() and step through it with the debugger to see what is
going on. If you can get this going consistently take a look at the
corresponding in code in WGLExtensions.cpp TemporaryWindow::create() and see
what is different. I think this must be specific to your setup as far as I
know even the ATI drivers are not this broken!

Roger

        BOOL bRet;

        // Windows system specific code
        // Create a private window class
        WNDCLASSEX MyWndClassEx =
        {
                sizeof(WNDCLASSEX),
                CS_OWNDC,
                MyWindowProc,
                0,
                0,
                NULL,
                NULL,
                NULL,
                NULL,
                NULL,
                "EnvironRenderer",
                NULL
        };
        ATOM MyClass = RegisterClassEx(&MyWndClassEx);
        DWORD dwError = GetLastError();
        HWND MyWindow = CreateWindow("EnvironRenderer", "MyWindow",
WS_POPUP, 0, 0, 800, 600, NULL, NULL, NULL, NULL);
        dwError = GetLastError();
        // Retrieve the private window DC
        m_MyDC = GetDC(MyWindow);

        PIXELFORMATDESCRIPTOR Pfd =
        { 
                sizeof(PIXELFORMATDESCRIPTOR),   // size of this pfd 
                1,                     // version number 
                PFD_DRAW_TO_WINDOW |   // support window 
                PFD_SUPPORT_OPENGL |   // support OpenGL 
                PFD_DOUBLEBUFFER,      // double buffered 
                PFD_TYPE_RGBA,         // RGBA type 
                24,                    // 24-bit color depth 
                0, 0, 0, 0, 0, 0,      // color bits ignored 
                0,                     // no alpha buffer 
                0,                     // shift bit ignored 
                0,                     // no accumulation buffer 
                0, 0, 0, 0,            // accum bits ignored 
                24,                    // 24-bit z-buffer 
                0,                     // no stencil buffer 
                0,                     // no auxiliary buffer 
                PFD_MAIN_PLANE,        // main layer 
                0,                     // reserved 
                0, 0, 0                // layer masks ignored 
        }; 
        int  iPixelFormat; 

        // get the best available match of pixel format for the device
context  
        iPixelFormat = ChoosePixelFormat(m_MyDC, &Pfd); 
        dwError = GetLastError();

        // make that the pixel format of the device context 
        bRet = SetPixelFormat(m_MyDC, iPixelFormat, &Pfd); 
        dwError = GetLastError();

        // Create a OpenGL rendering context
        m_MyContext = wglCreateContext(m_MyDC);
        dwError = GetLastError();

        bRet = wglMakeCurrent(m_MyDC, m_MyContext);
        dwError = GetLastError();


and the window proc

LRESULT CALLBACK MyWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM
lParam)
{
        return DefWindowProc(hwnd, uMsg, wParam, lParam);
}



_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to