• Advertisement
Sign in to follow this  

how to get o/p from GPGPU fbo color attachments

This topic is 3931 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have loads of shaders and about 10 textures for GPGPU. I use color attachments. After doing all the calculations I want to get the data back from the textures. The below is good as long as the texture is still attached the color attachment.
	glBindTexture(iTextureType,texId);
	glReadBuffer(GL_COLOR_ATTACHMENT0_EXT);
	glReadPixels(0, 0, itexSizeW, itexSizeH, GL_RGBA, GL_FLOAT, textureData);
But how can i get the texture data if the color attachments have been cleared ? Have I lost the data for good ? basically i want to simply do:
	glBindTexture(iTextureType,texId);
	glReadPixels(0, 0, itexSizeW, itexSizeH, GL_RGBA, GL_FLOAT, textureData);
cheers

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement