Fixed typo

This commit is contained in:
Robert Osfield
2005-09-01 19:12:06 +00:00
parent 2bafaea60a
commit caaeaee321
4 changed files with 25 additions and 9 deletions

View File

@@ -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);

View File

@@ -18,14 +18,14 @@
using namespace osg;
static ref_ptr<GraphicsContext::CreateGraphicContexCallback> s_createGraphicsContextCallback;
static ref_ptr<GraphicsContext::CreateGraphicContextCallback> 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();
}

View File

@@ -19,6 +19,20 @@
using namespace osg;
using namespace OpenThreads;
struct MyTest
{
MyTest()
{
osg::notify(osg::NOTICE)<<"MyTest Constructor"<<std::endl;
}
~MyTest()
{
osg::notify(osg::NOTICE)<<"MyTest Constructor"<<std::endl;
}
};
struct BlockOperation : public GraphicsThread::Operation, public Block
{
BlockOperation():
@@ -60,7 +74,7 @@ int GraphicsThread::cancel()
_done = true;
// cancel the thread..
result = Thread::cancel();
// result = Thread::cancel();
//join();
// release the frameBlock and _databasePagerThreadBlock incase its holding up thread cancelation.
@@ -124,6 +138,8 @@ void GraphicsThread::run()
osg::notify(osg::INFO)<<"Doing run"<<std::endl;
MyTest test;
bool firstTime = true;
OperationQueue::iterator itr = _operations.begin();

View File

@@ -20,7 +20,7 @@ using namespace osgProducer;
namespace osgProducer
{
struct MyCreateGraphicContexCallback : public osg::GraphicsContext::CreateGraphicContexCallback
struct MyCreateGraphicContexCallback : public osg::GraphicsContext::CreateGraphicContextCallback
{
virtual osg::GraphicsContext* createGraphicsContext(osg::GraphicsContext::Traits* traits)
{