hmi.graphics.opengl.state
Class GLStateComponentIF

java.lang.Object
  extended by hmi.graphics.opengl.state.GLStateComponentIF
All Implemented Interfaces:
GLRenderObject, GLStateComponent

public class GLStateComponentIF
extends Object
implements GLStateComponent

A GLStateComponentIF is a wrapper for GL attributes that are set by means of a call like glXYZ(glEnum, glId, glValf), where glEnum and glId are ints, glValf is a float value. Examples: glLightf with glEnum == light, glId == GL_SPOT_EXPONENT, GL_SPOT_CUTOFF, GL_CONSTANT_ATTENUATION, GL_LINEAR_ATTENUATION, GL_QUADRATIC_ATTENUATION. glMaterialfv with glEnumi == face, glId == GL_SHININESS glTexParameterfv with glEnumi == target, glId == GL_TEXTURE_MIN_LOD, GL_TEXTURE_MAX_LOD

Author:
Job Zwiers

Field Summary
private  int glEnumi
           
private  int glId
           
private  float glVal
           
private  int scId
           
 
Constructor Summary
GLStateComponentIF(int glEnumi, int glId, float glVal)
          Create a new GLStateComponentIF.
 
Method Summary
private  void checkLegal(int scId)
           
 int getSCId()
          Returns an integer that uniquely identifies the type of the GLStateComponent.
 void glInit(GLRenderContext gl)
          Called during OpenGL initialization.
 void glRender(GLRenderContext gl)
          Called during openGL rendering.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

glId

private int glId

scId

private int scId

glEnumi

private int glEnumi

glVal

private float glVal
Constructor Detail

GLStateComponentIF

public GLStateComponentIF(int glEnumi,
                          int glId,
                          float glVal)
Create a new GLStateComponentIF.

Method Detail

checkLegal

private void checkLegal(int scId)

getSCId

public final int getSCId()
Description copied from interface: GLStateComponent
Returns an integer that uniquely identifies the type of the GLStateComponent.

Specified by:
getSCId in interface GLStateComponent

glInit

public void glInit(GLRenderContext gl)
Description copied from interface: GLRenderObject
Called during OpenGL initialization.

Specified by:
glInit in interface GLRenderObject

glRender

public void glRender(GLRenderContext gl)
Description copied from interface: GLRenderObject
Called during openGL rendering.

Specified by:
glRender in interface GLRenderObject

toString

public String toString()
Overrides:
toString in class Object