Jump to content
  • Advertisement
Sign in to follow this  
7Days

OpenGL FBO rendering

This topic is 4547 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

Hi, My question is about rendering. I would like to pass the color I calculate in y fragment shader, directly to the CPU. I do not want it to be copy in the framebuffer. My problem is if I use a FBO, I do not have access to it ouside the GPU. I would like for example to use a FBO, and so copy the result of my fragment shader into an array in my CPU. Is it possoble? Because OpenGL is supposed to draw in the fragment buffer. But that is what I want to avoid. Indeed, I can do a gkReadPixel to pass from the fragment buffer to an array in the CPU, but it cost me a read and a write, so that means bus transit.... So I would like to be able to write directly on an array in my CPU.

Share this post


Link to post
Share on other sites
Advertisement
Basically, you can't.
The GPU targets its local ram, so you have to read back somewhere along the line to get at the data if you want to use it on the CPU.

Share this post


Link to post
Share on other sites
Thanks,

That is what I thought....
I will use sth like glReadBuffer, but it will cost me a lot....:(

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!