|
JOGL v2.6.0-rc-20250712
JOGL, High-Performance Graphics Binding for Java (public API).
|
Public Member Functions | |
| ShaderProgram () | |
| boolean | linked () |
| boolean | inUse () |
| int | program () |
| Returns the shader program name, which is non zero if valid. More... | |
| int | id () |
| returns the uniq shader id as an integer More... | |
| synchronized void | destroy (final GL2ES2 gl) |
| Detaches all shader codes and deletes the program. More... | |
| synchronized void | release (final GL2ES2 gl) |
| Detaches all shader codes and deletes the program, but leaves the shader code intact. More... | |
| synchronized void | release (final GL2ES2 gl, final boolean destroyShaderCode) |
| Detaches all shader codes and deletes the program. More... | |
| synchronized void | add (final ShaderCode shaderCode) throws GLException |
| Adds a new shader to this program. More... | |
| synchronized boolean | contains (final ShaderCode shaderCode) |
| synchronized ShaderCode | getShader (final int id) |
| Warning slow O(n) operation . More... | |
| synchronized final boolean | init (final GL2ES2 gl) |
Creates the empty GL program object using GL2ES2#glCreateProgram(), if not already created. More... | |
| synchronized boolean | add (final GL2ES2 gl, final ShaderCode shaderCode, final PrintStream verboseOut) |
| Adds a new shader to a this non running program. More... | |
| synchronized boolean | replaceShader (final GL2ES2 gl, final ShaderCode oldShader, final ShaderCode newShader, final PrintStream verboseOut) |
| Replace a shader in a program and re-links the program. More... | |
| synchronized boolean | link (final GL2ES2 gl, final PrintStream verboseOut) |
| Links the shader code to the program. More... | |
| boolean | equals (final Object obj) |
| int | hashCode () |
| StringBuilder | toString (StringBuilder sb) |
| String | toString () |
| synchronized boolean | validateProgram (final GL2ES2 gl, final PrintStream verboseOut) |
Performs GL2ES2#glValidateProgram(int) via ShaderUtil#isProgramExecStatusValid(GL, int, PrintStream). More... | |
| synchronized void | useProgram (final GL2ES2 gl, boolean on) |
| synchronized void | notifyNotInUse () |
| void | dumpSource (final PrintStream out) |
Definition at line 39 of file ShaderProgram.java.
| com.jogamp.opengl.util.glsl.ShaderProgram.ShaderProgram | ( | ) |
| synchronized boolean com.jogamp.opengl.util.glsl.ShaderProgram.add | ( | final GL2ES2 | gl, |
| final ShaderCode | shaderCode, | ||
| final PrintStream | verboseOut | ||
| ) |
Adds a new shader to a this non running program.
Compiles and attaches the shader, if not done yet.
Definition at line 167 of file ShaderProgram.java.
| synchronized void com.jogamp.opengl.util.glsl.ShaderProgram.add | ( | final ShaderCode | shaderCode | ) | throws GLException |
Adds a new shader to this program.
This command does not compile and attach the shader, use add(GL2ES2, ShaderCode) for this purpose.
Definition at line 119 of file ShaderProgram.java.
| synchronized boolean com.jogamp.opengl.util.glsl.ShaderProgram.contains | ( | final ShaderCode | shaderCode | ) |
Definition at line 123 of file ShaderProgram.java.
| synchronized void com.jogamp.opengl.util.glsl.ShaderProgram.destroy | ( | final GL2ES2 | gl | ) |
Detaches all shader codes and deletes the program.
Destroys the shader codes as well. Calls release(gl, true)
Definition at line 68 of file ShaderProgram.java.
| void com.jogamp.opengl.util.glsl.ShaderProgram.dumpSource | ( | final PrintStream | out | ) |
Definition at line 327 of file ShaderProgram.java.
| boolean com.jogamp.opengl.util.glsl.ShaderProgram.equals | ( | final Object | obj | ) |
Definition at line 268 of file ShaderProgram.java.
| synchronized ShaderCode com.jogamp.opengl.util.glsl.ShaderProgram.getShader | ( | final int | id | ) |
Warning slow O(n) operation .
| id |
Definition at line 132 of file ShaderProgram.java.
| int com.jogamp.opengl.util.glsl.ShaderProgram.hashCode | ( | ) |
Definition at line 277 of file ShaderProgram.java.
| int com.jogamp.opengl.util.glsl.ShaderProgram.id | ( | ) |
returns the uniq shader id as an integer
Definition at line 59 of file ShaderProgram.java.
| synchronized final boolean com.jogamp.opengl.util.glsl.ShaderProgram.init | ( | final GL2ES2 | gl | ) |
Creates the empty GL program object using GL2ES2#glCreateProgram(), if not already created.
| gl |
Definition at line 153 of file ShaderProgram.java.
| boolean com.jogamp.opengl.util.glsl.ShaderProgram.inUse | ( | ) |
| synchronized boolean com.jogamp.opengl.util.glsl.ShaderProgram.link | ( | final GL2ES2 | gl, |
| final PrintStream | verboseOut | ||
| ) |
Links the shader code to the program.
Compiles and attaches the shader code to the program if not done by yet
Within this process, all GL resources (shader and program objects) are created if necessary.
| gl | |
| verboseOut |
Definition at line 242 of file ShaderProgram.java.
| boolean com.jogamp.opengl.util.glsl.ShaderProgram.linked | ( | ) |
| synchronized void com.jogamp.opengl.util.glsl.ShaderProgram.notifyNotInUse | ( | ) |
| int com.jogamp.opengl.util.glsl.ShaderProgram.program | ( | ) |
Returns the shader program name, which is non zero if valid.
Definition at line 54 of file ShaderProgram.java.
| synchronized void com.jogamp.opengl.util.glsl.ShaderProgram.release | ( | final GL2ES2 | gl | ) |
Detaches all shader codes and deletes the program, but leaves the shader code intact.
Calls release(gl, false)
Definition at line 79 of file ShaderProgram.java.
| synchronized void com.jogamp.opengl.util.glsl.ShaderProgram.release | ( | final GL2ES2 | gl, |
| final boolean | destroyShaderCode | ||
| ) |
Detaches all shader codes and deletes the program.
If destroyShaderCode is true it destroys the shader codes as well.
Definition at line 87 of file ShaderProgram.java.
| synchronized boolean com.jogamp.opengl.util.glsl.ShaderProgram.replaceShader | ( | final GL2ES2 | gl, |
| final ShaderCode | oldShader, | ||
| final ShaderCode | newShader, | ||
| final PrintStream | verboseOut | ||
| ) |
Replace a shader in a program and re-links the program.
| gl | |
| oldShader | the to be replace Shader |
| newShader | the new ShaderCode |
| verboseOut | the optional verbose output stream |
Definition at line 199 of file ShaderProgram.java.
| String com.jogamp.opengl.util.glsl.ShaderProgram.toString | ( | ) |
Definition at line 299 of file ShaderProgram.java.
| StringBuilder com.jogamp.opengl.util.glsl.ShaderProgram.toString | ( | StringBuilder | sb | ) |
| synchronized void com.jogamp.opengl.util.glsl.ShaderProgram.useProgram | ( | final GL2ES2 | gl, |
| boolean | on | ||
| ) |
Definition at line 311 of file ShaderProgram.java.
| synchronized boolean com.jogamp.opengl.util.glsl.ShaderProgram.validateProgram | ( | final GL2ES2 | gl, |
| final PrintStream | verboseOut | ||
| ) |
Performs GL2ES2#glValidateProgram(int) via ShaderUtil#isProgramExecStatusValid(GL, int, PrintStream).
Definition at line 307 of file ShaderProgram.java.