Aviatrix3D
2.1.0

org.j3d.aviatrix3d.rendering
Interface ShaderComponentRenderable

All Superinterfaces:
java.lang.Comparable, ObjectRenderable, Renderable
All Known Implementing Classes:
FragmentShader, GL14ShaderProgram, ShaderProgram, VertexShader

public interface ShaderComponentRenderable
extends ObjectRenderable

A renderable object that contributes to part of a shader.

Version:
$Revision: 2.2 $
Author:
Justin Couch

Field Summary
static int FRAGMENT_SHADER
          The component represents a fragment shader
static int GEOMETRY_SHADER
          The component represents a geometry shader
static int PROGRAM_SHADER
          The component represents a complete GLSL shader program
static int VERTEX_SHADER
          The component represents a vertex shader
 
Method Summary
 int getComponentType()
          Get the type of component this state represents.
 int getProgramId(javax.media.opengl.GL gl)
          Fetch the ID handle for this program for the given context.
 boolean isValid(javax.media.opengl.GL gl)
          Check to see if this is linked for the given GL context.
 void reinitialize(javax.media.opengl.GL gl)
          Re-initialise this shader because the underlying GL context has changed.
 
Methods inherited from interface org.j3d.aviatrix3d.rendering.ObjectRenderable
postRender, render
 
Methods inherited from interface org.j3d.aviatrix3d.rendering.Renderable
equals
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

VERTEX_SHADER

static final int VERTEX_SHADER
The component represents a vertex shader

See Also:
Constant Field Values

FRAGMENT_SHADER

static final int FRAGMENT_SHADER
The component represents a fragment shader

See Also:
Constant Field Values

GEOMETRY_SHADER

static final int GEOMETRY_SHADER
The component represents a geometry shader

See Also:
Constant Field Values

PROGRAM_SHADER

static final int PROGRAM_SHADER
The component represents a complete GLSL shader program

See Also:
Constant Field Values
Method Detail

getComponentType

int getComponentType()
Get the type of component this state represents.

Returns:
One of the _SHADER constants

isValid

boolean isValid(javax.media.opengl.GL gl)
Check to see if this is linked for the given GL context. This tests to see if a valid program ID has already been assigned, indicating that at least an internal link(gl) call has been made.

Parameters:
gl - The GL context to test for linkage against
Returns:
true if there is a valid ID to work with

getProgramId

int getProgramId(javax.media.opengl.GL gl)
Fetch the ID handle for this program for the given context.

Parameters:
gl - The GL context to get the ID for
Returns:
The ID value or 0 if none

reinitialize

void reinitialize(javax.media.opengl.GL gl)
Re-initialise this shader because the underlying GL context has changed. This should also reinitialise any resources that it is dependent on.

Parameters:
gl - The GL context to reinitialise with

Aviatrix3D
2.1.0

Latest Info from http://aviatrix3d.j3d.org/
Copyright © 2003 - 2009 j3d.org