Jump to content

  • Log In with Google      Sign In   
  • Create Account


glUseProgram and glBindFramebuffer order


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
1 reply to this topic

#1 funnyben123   Members   -  Reputation: 103

Like
0Likes
Like

Posted 19 December 2012 - 09:49 PM

my apologies for being new to opengl,

does order matter when call glUseProgram and glBindFramebuffer?

if I -

glUseProgram(1)
glBindFramebuffer(x)
dlDrawElements()

Will I be using program 1?

Thanks!

Sponsor:

#2 sgt_barnes   Members   -  Reputation: 540

Like
1Likes
Like

Posted 20 December 2012 - 02:30 AM

Yes, of course!
The former binds the current program object (which tells OpenGL HOW to draw stuff) and the latter the current framebuffer object (which tells OpenGL WHERE to draw stuff).
Obviously, the order of the two doesn't matter, as long as you call them both before actually drawing anything.




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