Moved GL2Extensions functionality into the include/osg/GLExtensions header and new GLExtensions object.

Moved the #defines into new include/osg/GLDefines
Converted all GL2Extensions usage to GLExtensions usage


git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14593 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
Robert Osfield
2014-12-10 10:38:12 +00:00
parent 09205544b7
commit 485709f708
66 changed files with 1355 additions and 155 deletions

View File

@@ -72,8 +72,8 @@ class WindowCaptureCallback : public osg::Camera::DrawCallback
void read();
void readPixels();
void singlePBO(osg::GL2Extensions* ext);
void multiPBO(osg::GL2Extensions* ext);
void singlePBO(osg::GLExtensions* ext);
void multiPBO(osg::GLExtensions* ext);
typedef std::vector< osg::ref_ptr<osg::Image> > ImageBuffer;
typedef std::vector< GLuint > PBOBuffer;
@@ -218,7 +218,7 @@ void WindowCaptureCallback::ContextData::updateTimings(osg::Timer_t tick_start,
void WindowCaptureCallback::ContextData::read()
{
osg::GL2Extensions* ext = osg::GL2Extensions::Get(_gc->getState()->getContextID(),true);
osg::GLExtensions* ext = osg::GLExtensions::Get(_gc->getState()->getContextID(),true);
if (ext->isPBOSupported && !_pboBuffer.empty())
{
@@ -275,7 +275,7 @@ void WindowCaptureCallback::ContextData::readPixels()
_currentPboIndex = nextPboIndex;
}
void WindowCaptureCallback::ContextData::singlePBO(osg::GL2Extensions* ext)
void WindowCaptureCallback::ContextData::singlePBO(osg::GLExtensions* ext)
{
unsigned int nextImageIndex = (_currentImageIndex+1)%_imageBuffer.size();
@@ -350,7 +350,7 @@ void WindowCaptureCallback::ContextData::singlePBO(osg::GL2Extensions* ext)
_currentImageIndex = nextImageIndex;
}
void WindowCaptureCallback::ContextData::multiPBO(osg::GL2Extensions* ext)
void WindowCaptureCallback::ContextData::multiPBO(osg::GLExtensions* ext)
{
unsigned int nextImageIndex = (_currentImageIndex+1)%_imageBuffer.size();
unsigned int nextPboIndex = (_currentPboIndex+1)%_pboBuffer.size();