Jump to content

  • Log In with Google      Sign In   
  • Create Account

Opengl 3+ rendering to a texture


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 greenzone   Members   -  Reputation: 672

Like
1Likes
Like

Posted 16 April 2013 - 09:25 AM

If i want to render to a texture in opengl 3+ can i uses the same vertex shader and fragment shader that I use to handle other regular loaded textures or do i need to create a separate vertex shader and fragment shader just for the handling of the frambuffer texture?

 

 

 

 


J-GREEN

Greenpanoply

Sponsor:

#2 japro   Members   -  Reputation: 887

Like
2Likes
Like

Posted 16 April 2013 - 09:36 AM

It shouldn't matter whether the texture was/is attached to a fbo at any point. Just don't render to a texture you are currently sampling from :)



#3 _greyfox()   Members   -  Reputation: 1134

Like
2Likes
Like

Posted 18 April 2013 - 01:12 AM

Yes, you can use same fragment and vertex shaders for your framebuffer texture as well as for your rendering you main scene objects/textures.


“There are thousands and thousands of people out there leading lives of quiet, screaming desperation, where they work long, hard hours at jobs they hate to enable them to buy things they don't need to impress people they don't like.”― Nigel Marsh




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS