public class TLspShader extends Object
Modifier and Type | Class and Description |
---|---|
static class |
TLspShader.ShaderType
Enumeration values to identify vertex, geometry and fragment shaders.
|
Modifier and Type | Method and Description |
---|---|
static 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 |
destroy(ILcdGL aGL)
Destroys the shader making it invalid to use.
|
int |
getID()
Gets the OpenGL ID of the shader.
|
List<String> |
getSources()
Gets the paths to the source files that were used to create the shader.
|
TLspShader.ShaderType |
getType()
Gets the type of shader.
|
public List<String> getSources()
null
and empty.public static TLspShader createVertexShader(ILcdGL aGL, String aSource) throws IOException
aGL
- the ILcdGL objectaSource
- the full path to the source fileIOException
- when the source file cannot be readpublic static TLspShader createVertexShader(ILcdGL aGL, String[] aSources) throws IOException
aGL
- the ILcdGL objectaSources
- the full paths to the source filesIOException
- when the source files cannot be readpublic static TLspShader createVertexShaderFromSourceCode(ILcdGL aGL, String[] aSourceCode)
aGL
- the ILcdGL objectaSourceCode
- the source code chunkspublic static TLspShader createFragmentShader(ILcdGL aGL, String aSource) throws IOException
aGL
- the ILcdGL objectaSource
- the full path to the source fileIOException
- when the source file cannot be readpublic static TLspShader createFragmentShader(ILcdGL aGL, String[] aSources) throws IOException
aGL
- the ILcdGL objectaSources
- the full paths to the source filesIOException
- when the source files cannot be readpublic static TLspShader createFragmentShaderFromSourceCode(ILcdGL aGL, String[] aSourceCode)
aGL
- the ILcdGL objectaSourceCode
- the source code chunkspublic static TLspShader createGeometryShader(ILcdGL aGL, String aSource) throws IOException
aGL
- the ILcdGL objectaSource
- the full path to the source fileIOException
- when the source file cannot be readpublic static TLspShader createGeometryShader(ILcdGL aGL, String[] aSources) throws IOException
aGL
- the ILcdGL objectaSources
- the full paths to the source filesIOException
- when the source files cannot be readpublic int getID()
public TLspShader.ShaderType getType()
public void destroy(ILcdGL aGL)
aGL
- the ILcdGL object