Class TLspShader
java.lang.Object
com.luciad.view.lightspeed.util.opengl.glsl.TLspShader
A shader can be a vertex, geometry or fragment shader.
- Since:
- 2012.0
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Enumeration values to identify vertex, geometry and fragment shaders. -
Method Summary
Modifier and TypeMethodDescriptionstatic TLspShader
createFragmentShader
(ILcdGL aGL, String aSource) Creates a fragment shader from the given source file.static TLspShader
createFragmentShader
(ILcdGL aGL, String[] aSources) Creates a fragment shader from the given source files.static TLspShader
createFragmentShaderFromSourceCode
(ILcdGL aGL, String[] aSourceCode) Creates a fragment shader from the given source code chunks.static TLspShader
createGeometryShader
(ILcdGL aGL, String aSource) Creates a geometry shader from the given source file.static TLspShader
createGeometryShader
(ILcdGL aGL, String[] aSources) Creates a geometry shader from the given source files.static TLspShader
createVertexShader
(ILcdGL aGL, String aSource) Creates a vertex shader from the given source file.static TLspShader
createVertexShader
(ILcdGL aGL, String[] aSources) Creates a vertex shader from the given source files.static TLspShader
createVertexShaderFromSourceCode
(ILcdGL aGL, String[] aSourceCode) Creates a vertex shader from the given source code chunks.void
Destroys the shader making it invalid to use.int
getID()
Gets the OpenGL ID of the shader.Gets the paths to the source files that were used to create the shader.getType()
Gets the type of shader.
-
Method Details
-
getSources
Gets the paths to the source files that were used to create the shader. Can benull
and empty.- Returns:
- the paths to the source files that were used to create the shader
-
createVertexShader
Creates a vertex shader from the given source file.- Parameters:
aGL
- the ILcdGL objectaSource
- the full path to the source file- Returns:
- a new shader object for the given source file
- Throws:
IOException
- when the source file cannot be read
-
createVertexShader
Creates a vertex shader from the given source files.- Parameters:
aGL
- the ILcdGL objectaSources
- the full paths to the source files- Returns:
- a new shader object for the given source files
- Throws:
IOException
- when the source files cannot be read
-
createVertexShaderFromSourceCode
Creates a vertex shader from the given source code chunks.- Parameters:
aGL
- the ILcdGL objectaSourceCode
- the source code chunks- Returns:
- a new shader object for the given source code=
-
createFragmentShader
Creates a fragment shader from the given source file.- Parameters:
aGL
- the ILcdGL objectaSource
- the full path to the source file- Returns:
- a new shader object for the given source file
- Throws:
IOException
- when the source file cannot be read
-
createFragmentShader
Creates a fragment shader from the given source files.- Parameters:
aGL
- the ILcdGL objectaSources
- the full paths to the source files- Returns:
- a new shader object for the given source files
- Throws:
IOException
- when the source files cannot be read
-
createFragmentShaderFromSourceCode
Creates a fragment shader from the given source code chunks.- Parameters:
aGL
- the ILcdGL objectaSourceCode
- the source code chunks- Returns:
- a new shader object for the given source code=
-
createGeometryShader
Creates a geometry shader from the given source file.- Parameters:
aGL
- the ILcdGL objectaSource
- the full path to the source file- Returns:
- a new shader object for the given source file
- Throws:
IOException
- when the source file cannot be read
-
createGeometryShader
Creates a geometry shader from the given source files.- Parameters:
aGL
- the ILcdGL objectaSources
- the full paths to the source files- Returns:
- a new shader object for the given source files
- Throws:
IOException
- when the source files cannot be read
-
getID
public int getID()Gets the OpenGL ID of the shader.- Returns:
- the shader's OpenGL ID
-
getType
Gets the type of shader.- Returns:
- the shader type
-
destroy
Destroys the shader making it invalid to use.- Parameters:
aGL
- the ILcdGL object
-