Main | API | WebRender | bindTBO


bindTBO(tbo, textureSlot);

Connects the texture with the given tbo id with the texture slot given. This slot is then used by a shader for texture sampling.


tbo - [Unsigned Integer]

The id of the texture this is effecting. The id was provided by getTBOId.

textureSlot - [Unsigned Integer]

The id of the slot this texture is being assigned to. The value must be in the range 0 - 7.


This function is how textures are assigned to be sampled within the shader functions. For example, if I assign my texture into texture slot 0, then in the shader I would sample it with getTexturePixelColour giving it the texture reference TEXTURE_0. If I had put my texture in slot 1 then it would be referenced with TEXTURE_1 and so on.

See more detailed information about textures here.

See more detailed information about shaders here.

Additional Notes