org.osm2world.core.target.jogl
public abstract class AbstractShader extends Object
Modifier and Type | Field and Description |
---|---|
protected int |
fragmentShader |
protected GL3 |
gl |
protected int |
shaderProgram |
protected int |
vertexShader |
Constructor and Description |
---|
AbstractShader(GL3 gl,
String name)
Loads the vertex and fragment shaders with the basename name and ending vertex and fragment
and creates a shader program for them.
|
Modifier and Type | Method and Description |
---|---|
void |
disableShader() |
protected void |
finalize() |
void |
freeResources() |
int |
getProgram() |
void |
loadDefaults()
Load default values for the shader.
|
void |
useShader()
Make this shader program active.
|
protected void |
validateShader()
Validates the linked shader program.
|
protected GL3 gl
protected int vertexShader
protected int fragmentShader
protected int shaderProgram
public AbstractShader(GL3 gl, String name)
validateShader()
needs to be called manually.name
- basename of the shader to loadprotected void validateShader()
public void useShader()
public void disableShader()
public int getProgram()
public void freeResources()
protected void finalize()
finalize
in class Object
public void loadDefaults()
useShader()
and before any draw calls.