Main | API | WebRender | bindSBO

Function

bindSBO(sbo);

Sets the shader with the given id as the active shader for rendering.

Parameters

sbo - [Unsigned Integer]

The id of the shader program this is effecting. The id was provided by getSBOId.

Return

None.

Description

Once a shader has been created and loaded, it needs to be bound in order for it to be active during rendering. This function will set the shader with the given id as the active shader for rendering. Only one shader program can be active at a time, so the previously active shader will be made inactive.

If a value of 0 is given as the sbo, then the active shader will be set to null. If the active shader is null and you try to render an error will happen.

See more detailed information about shaders here.

Additional Notes

None.