Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


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 BLaBZ   Members   -  Reputation: 110

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: 605

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