Hi Asheer,
> > 1) Shouldn't the CPU to GPU data transfer be done with bindBufferInWriteMode? > Oh, I think I maid it not really clear enough. Everytime your write something to the buffer, you enable the buffer in write mode. So write to the buffer can be done in CPU->GPU as also GPU->CPU mode. For example if you transfer data from CPU to GPU, you enable your buffer in write mode, however only in the case when you fill the buffer from your CPU. After data is transfered to the buffer, you enable the buffer in read mode and call glTexSubImage2D to read the data from the buffer into the texture. So the code posted before is ok, however you first have to fill your buffer accordingly. Read this: http://www.songho.ca/opengl/gl_pbo.html to understand how PBO in OpenGL works. > > 2) How do I get an osg TextureRectangle to point to the data in the PDBO? The > TextureRectangle is attached to a camera in my first node and is passed as an > input to the shader program in the second node. > You have to upload the data from your PBO to your texture first. You can try to do so in a drawCallback before your shader program is called. > > 3) I assume that setDataSize in PDBO is in bytes? > Yes. > > 4) I get the following warning and a blank screen when the program runs: > "Warning: detected OpenGL error 'invalid operation' after > RenderBin::draw(,)". What does this mean? > it means you have used some of your calls not in a proper way. What the specific eror here is, I do not know. Maybe you should try first to write simple C application, which uses pure OpenGL calls in order to be sure and to learn, how to work with PBOs. > > I have also created a graphics context with the pbuffer enabled and used this > as the camera graphics context in the first node. > I do not know if PBOs works with pbuffers at all. Maybe somebody else can say more about that. I am always using just FBOs and with them PBOs don't have any issues. cheers, art ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=15675#15675 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

