Difference between fbo.bind() and fbo.getTextuture().bind()?

#1

I would like to learn the difference between fbo.bind() and fbo.getTextuture().bind().

When binding the FBO as a texture to a shape, I think it only works when I call fbo.getTextuture().bind().

When would one use fbo.bind() instead of fbo.getTextuture().bind()?


ADDED: It seems like fbo.bind() is only internally called by fbo.begin()?
Is this true?

https://openframeworks.cc/documentation/gl/ofFbo/#show_bind

#2

an ofFbo has several elements, the real fbo which is a way to let the opengl output go to something other than the screen and then depending on how it’s configured, one or more textures or renderbuffers

ofFbo::bind binds the fbo so opengl draws to the textures or renderbuffers the fbo points to.

That’s why to texture map a geometry or use the texture from a shader you have to bind the texture itself with ofFbo.getTexture().bind()

1 Like