Package engine.shaders
Class SelectorShader
java.lang.Object
engine.shaders.ShaderProgram
engine.shaders.SelectorShader
Extends the ShaderProgram and is responsible for handling the shaders for the selector square used for selecting a zone.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Binds all Attributes found in the GLSL file.protected void
Finds all uniform loactions in the GLSL file.void
loadProjectionMatrix
(org.joml.Matrix4f projection) Loads the projection matrix to the shader.void
loadTransformationMatrix
(org.joml.Matrix4f matrix) Loads the transformation matrix to the shader.void
loadViewMatrix
(Camera camera) Loads the view matrix to the shader after creating it based on the camera.Methods inherited from class engine.shaders.ShaderProgram
bindAttribute, cleanUp, getUniformLocation, load2DVector, loadBoolean, loadFloat, loadMatrix, loadVector, start, stop
-
Constructor Details
-
SelectorShader
public SelectorShader()
-
-
Method Details
-
bindAttributes
protected void bindAttributes()Binds all Attributes found in the GLSL file.- Specified by:
bindAttributes
in classShaderProgram
-
getAllUniformLocations
protected void getAllUniformLocations()Finds all uniform loactions in the GLSL file.- Specified by:
getAllUniformLocations
in classShaderProgram
-
loadTransformationMatrix
public void loadTransformationMatrix(org.joml.Matrix4f matrix) Loads the transformation matrix to the shader.- Parameters:
matrix
-
-
loadViewMatrix
Loads the view matrix to the shader after creating it based on the camera.- Parameters:
camera
-
-
loadProjectionMatrix
public void loadProjectionMatrix(org.joml.Matrix4f projection) Loads the projection matrix to the shader.- Parameters:
projection
-
-