diff --git a/include/osg/GraphicsContext b/include/osg/GraphicsContext index 21a400f31..71d1d813f 100644 --- a/include/osg/GraphicsContext +++ b/include/osg/GraphicsContext @@ -92,19 +92,19 @@ class OSG_EXPORT GraphicsContext : public Referenced /** Callback to be implemented to provide access to Windowing API's ability to create Windows/pbuffers.*/ - struct CreateGraphicContexCallback : public osg::Referenced + struct CreateGraphicContextCallback : public osg::Referenced { virtual GraphicsContext* createGraphicsContext(Traits* traits) = 0; - virtual ~CreateGraphicContexCallback() {}; + virtual ~CreateGraphicContextCallback() {}; }; /** Set the create graphics context callback - this callback should be supplied by the windows toolkit. */ - static void setCreateGraphicsContextCallback(CreateGraphicContexCallback* callback); + static void setCreateGraphicsContextCallback(CreateGraphicContextCallback* callback); /** Get the create graphics context callback*/ - static CreateGraphicContexCallback* getCreateGraphicsContextCallback(); + static CreateGraphicContextCallback* getCreateGraphicsContextCallback(); /** Create a graphics context for a specified set of traits.*/ static GraphicsContext* createGraphicsContext(Traits* traits); diff --git a/src/osg/GraphicsContext.cpp b/src/osg/GraphicsContext.cpp index d8a643468..816adfef6 100644 --- a/src/osg/GraphicsContext.cpp +++ b/src/osg/GraphicsContext.cpp @@ -18,14 +18,14 @@ using namespace osg; -static ref_ptr s_createGraphicsContextCallback; +static ref_ptr s_createGraphicsContextCallback; -void GraphicsContext::setCreateGraphicsContextCallback(CreateGraphicContexCallback* callback) +void GraphicsContext::setCreateGraphicsContextCallback(CreateGraphicContextCallback* callback) { s_createGraphicsContextCallback = callback; } -GraphicsContext::CreateGraphicContexCallback* GraphicsContext::getCreateGraphicsContextCallback() +GraphicsContext::CreateGraphicContextCallback* GraphicsContext::getCreateGraphicsContextCallback() { return s_createGraphicsContextCallback.get(); } diff --git a/src/osg/GraphicsThread.cpp b/src/osg/GraphicsThread.cpp index 16075d499..1371b121e 100644 --- a/src/osg/GraphicsThread.cpp +++ b/src/osg/GraphicsThread.cpp @@ -19,6 +19,20 @@ using namespace osg; using namespace OpenThreads; +struct MyTest +{ + MyTest() + { + osg::notify(osg::NOTICE)<<"MyTest Constructor"<