Introduced new BufferObject design + implementation in preperation of implementing a pool system for buffer objects
This commit is contained in:
@@ -73,8 +73,8 @@ class WindowCaptureCallback : public osg::Camera::DrawCallback
|
||||
|
||||
void read();
|
||||
void readPixels();
|
||||
void singlePBO(osg::BufferObject::Extensions* ext);
|
||||
void multiPBO(osg::BufferObject::Extensions* ext);
|
||||
void singlePBO(osg::GLBufferObject::Extensions* ext);
|
||||
void multiPBO(osg::GLBufferObject::Extensions* ext);
|
||||
|
||||
typedef std::vector< osg::ref_ptr<osg::Image> > ImageBuffer;
|
||||
typedef std::vector< GLuint > PBOBuffer;
|
||||
@@ -220,7 +220,7 @@ void WindowCaptureCallback::ContextData::updateTimings(osg::Timer_t tick_start,
|
||||
|
||||
void WindowCaptureCallback::ContextData::read()
|
||||
{
|
||||
osg::BufferObject::Extensions* ext = osg::BufferObject::getExtensions(_gc->getState()->getContextID(),true);
|
||||
osg::GLBufferObject::Extensions* ext = osg::GLBufferObject::getExtensions(_gc->getState()->getContextID(),true);
|
||||
|
||||
if (ext->isPBOSupported() && !_pboBuffer.empty())
|
||||
{
|
||||
@@ -277,7 +277,7 @@ void WindowCaptureCallback::ContextData::readPixels()
|
||||
_currentPboIndex = nextPboIndex;
|
||||
}
|
||||
|
||||
void WindowCaptureCallback::ContextData::singlePBO(osg::BufferObject::Extensions* ext)
|
||||
void WindowCaptureCallback::ContextData::singlePBO(osg::GLBufferObject::Extensions* ext)
|
||||
{
|
||||
unsigned int nextImageIndex = (_currentImageIndex+1)%_imageBuffer.size();
|
||||
|
||||
@@ -352,7 +352,7 @@ void WindowCaptureCallback::ContextData::singlePBO(osg::BufferObject::Extensions
|
||||
_currentImageIndex = nextImageIndex;
|
||||
}
|
||||
|
||||
void WindowCaptureCallback::ContextData::multiPBO(osg::BufferObject::Extensions* ext)
|
||||
void WindowCaptureCallback::ContextData::multiPBO(osg::GLBufferObject::Extensions* ext)
|
||||
{
|
||||
unsigned int nextImageIndex = (_currentImageIndex+1)%_imageBuffer.size();
|
||||
unsigned int nextPboIndex = (_currentPboIndex+1)%_pboBuffer.size();
|
||||
|
||||
Reference in New Issue
Block a user