public interface JCGLShadersType extends JCGLShaderUniformsType
Modifier and Type | Method and Description |
---|---|
Optional<JCGLProgramShaderUsableType> |
shaderActivatedProgram() |
void |
shaderActivateProgram(JCGLProgramShaderUsableType p)
Activate the given program for use in rendering.
|
JCGLFragmentShaderType |
shaderCompileFragment(String name,
List<String> lines)
Read a GLSL fragment shader from the lines of GLSL source code given in
lines . |
JCGLGeometryShaderType |
shaderCompileGeometry(String name,
List<String> lines)
Read a GLSL geometry shader from the lines of GLSL source code given in
lines . |
JCGLVertexShaderType |
shaderCompileVertex(String name,
List<String> lines)
Read a GLSL vertex shader from the lines of GLSL source code given in
lines . |
void |
shaderDeactivateProgram()
Deactivate any active program.
|
void |
shaderDeleteFragment(JCGLFragmentShaderType f)
Delete the given shader.
|
void |
shaderDeleteGeometry(JCGLGeometryShaderType g)
Delete the given shader.
|
void |
shaderDeleteProgram(JCGLProgramShaderType p)
Delete the given shader.
|
void |
shaderDeleteVertex(JCGLVertexShaderType v)
Delete the given shader.
|
JCGLProgramShaderType |
shaderLinkProgram(String name,
JCGLVertexShaderUsableType v,
Optional<JCGLGeometryShaderUsableType> g,
JCGLFragmentShaderUsableType f)
Link a program consisting of the vertex shader
v , the optional
geometry shader g , and the fragment shader f . |
shaderUniformPutFloat, shaderUniformPutInteger, shaderUniformPutMatrix3x3f, shaderUniformPutMatrix4x4f, shaderUniformPutPMatrix3x3f, shaderUniformPutPMatrix4x4f, shaderUniformPutPVector2f, shaderUniformPutPVector2i, shaderUniformPutPVector2ui, shaderUniformPutPVector3f, shaderUniformPutPVector3i, shaderUniformPutPVector3ui, shaderUniformPutPVector4f, shaderUniformPutPVector4i, shaderUniformPutPVector4ui, shaderUniformPutTexture2DUnit, shaderUniformPutTextureCubeUnit, shaderUniformPutUnsignedInteger, shaderUniformPutVector2f, shaderUniformPutVector2i, shaderUniformPutVector2ui, shaderUniformPutVector3f, shaderUniformPutVector3i, shaderUniformPutVector3ui, shaderUniformPutVector4f, shaderUniformPutVector4i, shaderUniformPutVector4ui, shaderUniformPutVectorf, shaderUniformSetActivityCheckingEnabled, shaderUniformSetTypeCheckingEnabled
void shaderDeleteProgram(JCGLProgramShaderType p) throws JCGLException, JCGLExceptionDeleted
p
- The shaderJCGLException
- Iff an OpenGL error occursJCGLExceptionDeleted
- Iff the shader is already deletedvoid shaderDeleteVertex(JCGLVertexShaderType v) throws JCGLException, JCGLExceptionDeleted
v
- The shaderJCGLException
- Iff an OpenGL error occursJCGLExceptionDeleted
- Iff the shader is already deletedvoid shaderDeleteFragment(JCGLFragmentShaderType f) throws JCGLException, JCGLExceptionDeleted
f
- The shaderJCGLException
- Iff an OpenGL error occursJCGLExceptionDeleted
- Iff the shader is already deletedvoid shaderDeleteGeometry(JCGLGeometryShaderType g) throws JCGLException, JCGLExceptionDeleted
g
- The shaderJCGLException
- Iff an OpenGL error occursJCGLExceptionDeleted
- Iff the shader is already deletedJCGLVertexShaderType shaderCompileVertex(String name, List<String> lines) throws JCGLExceptionProgramCompileError, JCGLException
lines
. Each line must be terminated with an end-of-line terminator
(GLSL accepts both LF and CRLF as EOL tokens). The program will be named
name
in any error messages.name
- The name of the programlines
- A list of lines of GLSL source codeJCGLExceptionProgramCompileError
- Iff a compilation error occursJCGLException
- Iff an OpenGL error occursJCGLFragmentShaderType shaderCompileFragment(String name, List<String> lines) throws JCGLExceptionProgramCompileError, JCGLException
lines
. Each line must be terminated with an end-of-line terminator
(GLSL accepts both LF and CRLF as EOL tokens). The program will be named
name
in any error messages.name
- The name of the programlines
- A list of lines of GLSL source codeJCGLExceptionProgramCompileError
- Iff a compilation error occursJCGLException
- Iff an OpenGL error occursJCGLGeometryShaderType shaderCompileGeometry(String name, List<String> lines) throws JCGLExceptionProgramCompileError, JCGLException
lines
. Each line must be terminated with an end-of-line terminator
(GLSL accepts both LF and CRLF as EOL tokens). The program will be named
name
in any error messages.name
- The name of the programlines
- A list of lines of GLSL source codeJCGLExceptionProgramCompileError
- Iff a compilation error occursJCGLException
- Iff an OpenGL error occursJCGLProgramShaderType shaderLinkProgram(String name, JCGLVertexShaderUsableType v, Optional<JCGLGeometryShaderUsableType> g, JCGLFragmentShaderUsableType f) throws JCGLExceptionProgramCompileError, JCGLException, JCGLExceptionDeleted
v
, the optional
geometry shader g
, and the fragment shader f
.name
- The name of the programv
- A vertex shaderg
- A geometry shader, if requiredf
- A fragment shaderJCGLExceptionProgramCompileError
- Iff the program cannot be linkedJCGLExceptionDeleted
- Iff any of the shaders have been
deletedJCGLException
- Iff an OpenGL error occursvoid shaderActivateProgram(JCGLProgramShaderUsableType p) throws JCGLException, JCGLExceptionDeleted
p
- The programJCGLException
- Iff an OpenGL error occursJCGLExceptionDeleted
- Iff the shader has been deletedvoid shaderDeactivateProgram() throws JCGLException
JCGLException
- Iff an OpenGL error occursOptional<JCGLProgramShaderUsableType> shaderActivatedProgram() throws JCGLException
JCGLException
- Iff an OpenGL error occursCopyright © 2017 <code@io7m.com> http://io7m.com