Hi forum,

I am trying to create the OpenCL 2D Texture from the GL Texture Buffer object as follows:

Code :
......................
.......................
	 if( texture_target == GL_TEXTURE_2D || texture_target == GL_TEXTURE_RECTANGLE )
	 {
	    memory._m_clGraphicsArrayBuffer = clCreateFromGLTexture2D(cxt->_m_clContext,
								      CL_MEM_READ_WRITE,
								      texture_target,
								      0,
								      tex->id(),
								      &errNum);
 
	    if(errNum != CL_SUCCESS)
	    {
	       osg::notify(osg::FATAL) << __FUNCTION__ << ": unable to pull out the 2D OpenCL texture memory from the OpenGL memory: " << cxt->getErrorString(errNum)  << std::endl;
 
	       return false;
	    }
	 }


I am getting the error notification as mentioned in the code snippet. Any idea of the possible causes of the error - CL_OUT_OF_RESOURCES ?


Thanks
Sajjadul