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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user