Changed the return types of makeCurrent to bool, and added a bool GraphicsContext::releaseContext method

along with implementations in osgViewer.
This commit is contained in:
Robert Osfield
2007-01-08 19:29:59 +00:00
parent 4a5eda6522
commit 16d1c00a3d
18 changed files with 221 additions and 126 deletions

View File

@@ -46,11 +46,14 @@ class GraphicsContextCocoa : public osg::GraphicsContext
/** Make this graphics context current implementation.
* Pure virtual - must be implemented by concrate implementations of GraphicsContext. */
virtual void makeCurrentImplementation() { osg::notify(osg::NOTICE)<<"GraphicsWindow::makeCurrentImplementation() not implemented."<<std::endl; }
virtual bool makeCurrentImplementation() { osg::notify(osg::NOTICE)<<"GraphicsWindow::makeCurrentImplementation() not implemented."<<std::endl; return false;}
/** Make this graphics context current with specified read context implementation.
* Pure virtual - must be implemented by concrate implementations of GraphicsContext. */
virtual void makeContextCurrentImplementation(GraphicsContext* /*readContext*/) { osg::notify(osg::NOTICE)<<"GraphicsWindow::makeContextCurrentImplementation(..) not implemented."<<std::endl; }
virtual bool makeContextCurrentImplementation(GraphicsContext* /*readContext*/) { osg::notify(osg::NOTICE)<<"GraphicsWindow::makeContextCurrentImplementation(..) not implemented."<<std::endl; return false; }
/** Release the graphics context.*/
virtual bool releaseContextImplementation() { osg::notify(osg::NOTICE)<<"GraphicsWindow::releaseContextImplementation(..) not implemented."<<std::endl; return false; }
/** Pure virtual, Bind the graphics context to associated texture implementation.
* Pure virtual - must be implemented by concrate implementations of GraphicsContext. */
@@ -84,9 +87,16 @@ bool GraphicsWindowCocoa::realizeImplementation()
return false;
}
void GraphicsWindowCocoa::makeCurrentImplementation()
bool GraphicsWindowCocoa::makeCurrentImplementation()
{
osg::notify(osg::NOTICE)<<"GraphicWindowCocoa::makeCurrentImplementation() Please implement me!"<<std::endl;
return false;
}
bool GraphicsWindowCocoa::releaseContextImplementation()
{
osg::notify(osg::NOTICE)<<"GraphicWindowCocoa::releaseContextImplementation() Please implement me!"<<std::endl;
return false;
}
void GraphicsWindowCocoa::closeImplementation()