From 02081af4f88424ca78d3fb8c9c152e869e0ff4f2 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 21 Apr 2011 13:01:11 +0000 Subject: [PATCH] From Fred Smith, "GraphicsWindowWin32::setWindow currently creates a context with no regards to the Traits, like createWindow does. That is, it calls ::wglCreateContext to create a context, not the member method createContextImplementation(), which takes into an account the Traits. In my situation, this prevents a GL 3.x context from being created. " --- src/osgViewer/GraphicsWindowWin32.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osgViewer/GraphicsWindowWin32.cpp b/src/osgViewer/GraphicsWindowWin32.cpp index b31d38a18..df0ab6e9b 100644 --- a/src/osgViewer/GraphicsWindowWin32.cpp +++ b/src/osgViewer/GraphicsWindowWin32.cpp @@ -1252,7 +1252,7 @@ bool GraphicsWindowWin32::setWindow( HWND handle ) return false; } - _hglrc = ::wglCreateContext(_hdc); + _hglrc = createContextImplementation(); if (_hglrc==0) { reportErrorForScreen("GraphicsWindowWin32::setWindow() - Unable to create OpenGL rendering context", _traits->screenNum, ::GetLastError());