From Andre Garneau,"Please find attached changes to have the GraphicsWindowWin32 class

selectively set the pixel format for windows that are inherited, following
some discussions on the mailing list last week.

This is implemented through a new traits flag
(setInheritedWindowPixelFormat) with a default state of false (to avoid
breaking existing applications). When set to true, the pixel format of the
inherited window will be set according to the traits specifications.
"
This commit is contained in:
Robert Osfield
2007-05-17 10:33:44 +00:00
parent d80cf6b5ee
commit 8c10301d30
2 changed files with 31 additions and 35 deletions

View File

@@ -77,7 +77,8 @@ class OSG_EXPORT GraphicsContext : public Object
vsync(true),
useMultiThreadedOpenGLEngine(false),
useCursor(true),
sharedContext(0) {}
sharedContext(0),
setInheritedWindowPixelFormat(false) {}
// graphics context orginal and size
int x;
@@ -126,6 +127,9 @@ class OSG_EXPORT GraphicsContext : public Object
GraphicsContext* sharedContext;
osg::ref_ptr<osg::Referenced> inheritedWindowData;
// ask the GraphicsWindow implementation to set the pixel format of an inherited window
bool setInheritedWindowPixelFormat;
};