glUseProgram and glBindFramebuffer order

Started by
0 comments, last by sgt_barnes 11 years, 3 months ago
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!
Advertisement
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.

This topic is closed to new replies.

Advertisement