Skip to main content
GameDev.net gamedev.net
๐Ÿ”’ Locked

glUseProgram and glBindFramebuffer order

Started by funnyben123 Dec 20, 2012 at 3:49 AM 0 replies 2.8k views
Original Post
funnyben123
funnyben123
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!
sgt_barnes
sgt_barnes
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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.