Sign in to follow this  
_dogo

image parting.

Recommended Posts

Hi. I have an image in the framebuffer. I have to convert it: change two parts of it. for ex. i want to put the topleft quarter to the bottom-right part, and the bottom-right quarter to the topleft quarter. could you tell me how to do this? thank you.

Share this post


Link to post
Share on other sites
You have to copy the framebuffer contents (top-left quarter and bottom-right) to two 2D textures. Use glCopyTexSubImage2D. Then just render these 2 textures in appropriate places. Another way is to use framebuffer objects (EXT_framebuffer_object) to directly render the 2 quarters into textures. The render the textures into main framebuffer.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this