What does 'Binding' and 'Wrapping' mean in OpenGL sense?
Wrapping and Binding
Crossbones+ - Reputation: 4437
Posted 10 January 2014 - 11:52 AM
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 ...
Members - Reputation: 1187
Posted 10 January 2014 - 03:29 PM
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.
Edited by richardurich, 10 January 2014 - 03:31 PM.