Hi mp3butcher
You are right - this method is insufficient for your needs.
The simplest way to overcome this is to write osg::TextureBuffer
descendant with one method added :
Code:
void MyTextureBuffer::bindBufferBase( unsigned int contextID, GLuint target,
GLuint index )
{
TextureBufferObject* textureBufferObject =
_textureBufferObjects[contextID].get();
textureBufferObject->_extensions->glBindBufferBase( target, index,
textureBufferObject->_id );
}
... and then use this method in your osg::Drawable descendant to connect
texture buffers to your transform feedback object :
Code:
for( unsigned int i=0; i < texBuffer.size(); ++i)
{
texBuffer[i]->bindBufferBase( renderInfo.getContextID(),
GL_TRANSFORM_FEEDBACK_BUFFER, i );
}
... where texBuffer is declared as
Code:
std::vector< osg::ref_ptr< MyTextureBuffer > > ;
--
Pawel Ksiezopolski
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=62191#62191
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org