org.osm2world.core.target.jogl
public class DepthBufferShader extends AbstractPrimitiveShader
USE_TRANSPARENCY
.Modifier and Type | Field and Description |
---|---|
static boolean |
USE_TRANSPARENCY |
renderOnlySemiTransparent, renderSemiTransparent
fragmentShader, gl, shaderProgram, vertexShader
Constructor and Description |
---|
DepthBufferShader(GL3 gl) |
Modifier and Type | Method and Description |
---|---|
int |
getModelViewProjectionMatrixID()
Returns the id to use to bind the ModelViewProjectionMatrix attribute.
|
int |
getVertexBumpMapCoordID()
Returns the id to use by
JOGLRendererVBOShader to bind the vertex bumpmap coordinate attribute. |
int |
getVertexNormalID()
Returns the id to use by
JOGLRendererVBOShader to bind the vertex normal attribute. |
int |
getVertexPositionID()
Returns the id to use by
JOGLRendererVBOShader to bind the vertex position attribute. |
int |
getVertexTangentID()
Returns the id to use by
JOGLRendererVBOShader to bind the vertex tangent attribute. |
int |
getVertexTexCoordID(int i)
Returns the id to use by
JOGLRendererVBOShader to bind the vertex texture coordinate attribute. |
boolean |
setMaterial(Material material,
JOGLTextureManager textureManager)
Prepare the shader to use the given material when rendering the primitives later.
|
void |
setPMVMatrix(PMVMatrix pmvMatrix)
Send uniform matrices "ProjectionMatrix, ModelViewMatrix and ModelViewProjectionMatrix" to vertex shader
|
glDisableVertexAttribArray, glEnableVertexAttribArray, glVertexAttribPointer, setRenderOnlySemiTransparent, setRenderSemiTransparent
disableShader, finalize, freeResources, getProgram, loadDefaults, useShader, validateShader
public static final boolean USE_TRANSPARENCY
public void setPMVMatrix(PMVMatrix pmvMatrix)
pmvMatrix
- public int getVertexPositionID()
AbstractPrimitiveShader
JOGLRendererVBOShader
to bind the vertex position attribute.
May be -1 if the attribute is unused.getVertexPositionID
in class AbstractPrimitiveShader
public int getModelViewProjectionMatrixID()
public boolean setMaterial(Material material, JOGLTextureManager textureManager)
AbstractPrimitiveShader
setMaterial
in class AbstractPrimitiveShader
material
- the material to applytextureManager
- the texture manager to use if the material has texturestrue
if this shader wants to render primitives with the given material at all, false
otherwise.public int getVertexNormalID()
AbstractPrimitiveShader
JOGLRendererVBOShader
to bind the vertex normal attribute.
May be -1 if the attribute is unused.getVertexNormalID
in class AbstractPrimitiveShader
public int getVertexTexCoordID(int i)
AbstractPrimitiveShader
JOGLRendererVBOShader
to bind the vertex texture coordinate attribute.
May be -1 if the attribute is unused.getVertexTexCoordID
in class AbstractPrimitiveShader
public int getVertexBumpMapCoordID()
AbstractPrimitiveShader
JOGLRendererVBOShader
to bind the vertex bumpmap coordinate attribute.
May be -1 if the attribute is unused.getVertexBumpMapCoordID
in class AbstractPrimitiveShader
public int getVertexTangentID()
AbstractPrimitiveShader
JOGLRendererVBOShader
to bind the vertex tangent attribute.
May be -1 if the attribute is unused.getVertexTangentID
in class AbstractPrimitiveShader