RTT buffers

Problems building or running the engine, queries about how to use features etc.
Post Reply
Gucci
Gnoblar
Posts: 6
Joined: Mon Nov 24, 2014 7:07 pm

RTT buffers

Post by Gucci »

Hi everyone,

I am trying to render to a texture, and use that texture in OpenCL. I have already managed to use "normal" manual textures with OpenCL (http://www.ogre3d.org/forums/viewtopic.php?f=2&t=82084), and I can use RTT fine on it's own (http://www.ogre3d.org/tikiwiki/tiki-ind ... Tutorial+7) with the buffer locks. When I try to use the texture rendered to in OpenCL (right after it has been updated), the data I read is garbage. I can still read/write fine to other manual textures (e.g with TU_DYNAMIC_WRITE_ONLY_DISCARDABLE), but not with TU_RENDERTARGET.

My guess is that I access the rtt buffer either at the wrong time (something is not set/ready yet) or that I am reading from the wrong buffer. Currently I get the underlying OpenGL ID of the texture buffer (the same way I use normal manual textures), is that wrong for render to texture buffers?

Thanks
Post Reply