Attaches a shader to the program.
Binds the sampler to the texture unit. The binding is done according to the texture layout, which must be set in the program for the textures that will be used before any binding can be done.
Detaches a shader from the shader.
Gets the ID for this program as assigned by OpenGL.
Returns the shaders that have been attached to this program.
Returns an set containing all of the uniform names for this program.
Links the shaders together in the program. This makes it usable.
Sets a uniform boolean in the shader to the desired value.
Sets a uniform integer in the shader to the desired value.
Sets a uniform float in the shader to the desired value.
Sets a uniform float array in the shader to the desired value.
Sets a uniform {@link com.flowpowered.math.vector.Vector2f} in the shader to the desired value.
Sets a uniform {@link com.flowpowered.math.vector.Vector3f} in the shader to the desired value.
Sets a uniform {@link com.flowpowered.math.vector.Vector4f} in the shader to the desired value.
Sets a uniform {@link com.flowpowered.math.matrix.Matrix4f} in the shader to the desired value.
Sets a uniform {@link com.flowpowered.math.matrix.Matrix4f} in the shader to the desired value.
Sets a uniform {@link com.flowpowered.math.matrix.Matrix4f} in the shader to the desired value.
Binds this program to the OpenGL context.
Creates the resources. It can now be used.
Releases the resource. It can not longer be used.
Returns true if the resource was created and is ready for use, false if otherwise.
Throws an exception if the resource hasn't been created yet.
Throws an exception if the resource has been created already.
Returns the lowest OpenGL version required by this object's implementation.
Represents an OpenGL program. A program holds the necessary shaders for the rendering pipeline. When using GL20, it is strongly recommended to set the attribute layout in the {@link org.spout.renderer.api.gl.Shader}s with {@link org.spout.renderer.api.gl.Shader#setAttributeLayout(String, int)}}, which must be done before attaching it. The layout allows for association between the attribute index in the vertex data and the name in the shaders. For GL30, it is recommended to do so in the shaders instead, using the "layout" keyword. Failing to do so might result in partial, wrong or missing rendering, and affects models using multiple attributes. The texture layout should also be setup using {@link Shader#setTextureLayout(int, String)} in the same way.