Wrapping and Binding

Started by
2 comments, last by AbandonedAccount 10 years, 3 months ago

What does 'Binding' and 'Wrapping' mean in OpenGL sense?

Advertisement

It might help to add a bit of context to the question. What exactly is causing you problems?

Binding usually names the process of declaring a texture, VBO, FBO, UBO, or similar thing as the active instance, i.e. those instance where sub-sequent belonging commands will have an effect onto.

Wrapping … well, please follow BitMaster's advice ...

A lot of OpenGL calls (and I mean A LOT) do not have input parameters specifying all the inputs you are providing, but instead rely on what you have previously bound. If you are uncomfortable with the idea of trying to keep track of all of that yourself, you can use bindless calls. It's pretty well-supported now, so it's really just personal preference. Binding is sort of like when you load things into registers working on low-level code, so if you like higher level coding styles you should just use the bindless versions of the functions.

For wrapping, it's how OpenGL deals with you giving a texture coordinate outside the range of 0 to 1. You can set it to use a predefined border color, you can clamp to edge, you can just wrap around and start over, or you can mirror back-and-forth. So 1.1 can either be invalid and yield a background color, can be clamped to 1.0, can map to 0.1, or can map to 0.9.

This topic is closed to new replies.

Advertisement