Hi Sajjadul, As I said I don't know what is going amiss in your code. Debugging this type of thing really requires a proper overview of all the code and ideally testable code. This level of support is something I can provide.
Perhaps if you can't manage the wiring up of OpenCL and the OSG yourself you should look for 3rd party example codes that do it. I haven't personally implemented OpenCL and OSG integation so can't help directly. Robert. On 18 October 2013 07:53, Sajjadul Islam <[email protected]> wrote: > 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 >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

