Thanks Robert,
I am not calling glGenBuffers() in my code. I am calling the following :
Code:
osg::GLBufferObject *glBO =
vbo->getOrCreateGLBufferObject(osgCompute::GLMemory::getContext()->getState()->getContextID());
Since i am getting undefined behavior, i used the debugger to get inside the
above statement and found that i am having the issue inside the GLBufferObject
constructor.
Code:
GLBufferObject::GLBufferObject(unsigned int contextID, BufferObject*
bufferObject, unsigned int glObjectID):
_contextID(contextID),
_glObjectID(glObjectID),
_profile(0,0,0),
_allocatedSize(0),
_dirty(true),
_bufferObject(0),
_set(0),
_previous(0),
_next(0),
_frameLastUsed(0),
_extensions(0)
{
assign(bufferObject);
_extensions = GLBufferObject::getExtensions(contextID, true);
if (glObjectID==0)
{
_extensions->glGenBuffers(1, &_glObjectID);
}
// OSG_NOTICE<<"Constucting BufferObject "<<this<<std::endl;
}
The immediate above snippet is from the BufferObject file that came along with
the API.
And i found that _glObjectID is carrying the value 0 even after call:
Code:
_extensions->glGenBuffers(1, &_glObjectID);
I believe that 0 is not a valid value here.
Any more thoughts ?
Regards,
Sajjadul
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=56844#56844
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org