Hi, FYI, when making a submission you will need to attached the entire modified file for it to be considered. There are submission guide lines on the wiki. Your change looks correct to me though : )
Cheers, Brad -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Fred Smith Sent: Tuesday, 5 April 2011 6:12 PM To: [email protected] Subject: [osg-submissions] GraphicsWindowWin32::setWindow( HWND handle ) - creating the right context with the right Traits Hi, 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. Therefore I think the code should read: Code: bool GraphicsWindowWin32::setWindow( HWND handle ) { if (!setPixelFormat()) { reportErrorForScreen("GraphicsWindowWin32::setWindow() - Unable to set the inherited window pixel format", _traits->screenNum, ::GetLastError()); ::ReleaseDC(_hwnd, _hdc); _hdc = 0; _hwnd = 0; return false; } // -- wrong //_hglrc = ::wglCreateContext(_hdc); // ++ correct _hglrc = createContextImplementation(); if (_hglrc==0) { reportErrorForScreen("GraphicsWindowWin32::setWindow() - Unable to create OpenGL rendering context", _traits->screenNum, ::GetLastError()); ::ReleaseDC(_hwnd, _hdc); _hdc = 0; _hwnd = 0; return false; } } Cheers, Fred ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=38217#38217 _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org DISCLAIMER:--------------------------------------------------------------------------- This e-mail transmission and any documents, files and previous e-mail messages attached to it are private and confidential. They may contain proprietary or copyright material or information that is subject to legal professional privilege. They are for the use of the intended recipient only. Any unauthorised viewing, use, disclosure, copying, alteration, storage or distribution of, or reliance on, this message is strictly prohibited. No part may be reproduced, adapted or transmitted without the written permission of the owner. If you have received this transmission in error, or are not an authorised recipient, please immediately notify the sender by return email, delete this message and all copies from your e-mail system, and destroy any printed copies. Receipt by anyone other than the intended recipient should not be deemed a waiver of any privilege or protection. Thales Australia does not warrant or represent that this e-mail or any documents, files and previous e-mail messages attached are error or virus free. -------------------------------------------------------------------------------------- _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
