org.xith3d.render
Class SceneGraphOpenGLReference

java.lang.Object
  extended by org.xith3d.render.SceneGraphOpenGLReference

public abstract class SceneGraphOpenGLReference
extends java.lang.Object

This class manages the reference of SceneGraph objects to OpenGL names.


Field Summary
static int UNSET_NAME
           
 
Constructor Summary
SceneGraphOpenGLReference(CanvasPeer context, SceneGraphOpenGLReferences references, int numNames)
          Creates a new SceneGraphOpenGLReference.
 
Method Summary
 int deleteName()
          Sets the (first) OpenGL name.
 int deleteName(int index)
          Sets the OpenGL name with the specified index.
 void destroyObject()
          Destroys this Object in OpenGL.
abstract  void destroyObject(int index, int name)
          Destroys this Object in OpenGL.
 CanvasPeer getContext()
           
 int getName()
           
 int getName(int index)
           
 int getNumNames(boolean onlyExisting)
           
 SceneGraphOpenGLReferences getReferences()
           
 void invalidateName()
          Sets the (first) OpenGL name.
 void invalidateName(int index)
          Sets the OpenGL name with the specified index.
 boolean isNameValid()
           
 boolean isNameValid(int index)
           
 boolean nameExists()
           
 boolean nameExists(int index)
           
abstract  void prepareObjectForDestroy()
           
 void setName(int name)
          Sets the (first) OpenGL name.
 void setName(int index, int name)
          Sets the OpenGL name with the specified index.
 void setNameValid(boolean valid)
          Sets the (first) OpenGL name.
 void setNameValid(int index, boolean valid)
          Sets the OpenGL name with the specified index.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNSET_NAME

public static final int UNSET_NAME
See Also:
Constant Field Values
Constructor Detail

SceneGraphOpenGLReference

public SceneGraphOpenGLReference(CanvasPeer context,
                                 SceneGraphOpenGLReferences references,
                                 int numNames)
Creates a new SceneGraphOpenGLReference.

Parameters:
references -
numNames -
Method Detail

getContext

public final CanvasPeer getContext()

getReferences

public final SceneGraphOpenGLReferences getReferences()

setName

public final void setName(int index,
                          int name)
Sets the OpenGL name with the specified index.

Parameters:
index -
name -

deleteName

public final int deleteName(int index)
Sets the OpenGL name with the specified index.

Parameters:
index -

setName

public final void setName(int name)
Sets the (first) OpenGL name.

Parameters:
name -

deleteName

public final int deleteName()
Sets the (first) OpenGL name.


getName

public final int getName(int index)
Parameters:
index -
Returns:
the OpenGL name with the specified index.

nameExists

public final boolean nameExists(int index)
Parameters:
index -
Returns:
true, if the (first) OpenGL name exists.

getName

public final int getName()
Returns:
the (first) OpenGL name.

nameExists

public final boolean nameExists()
Returns:
true, if the (first) OpenGL name exists.

setNameValid

public final void setNameValid(int index,
                               boolean valid)
Sets the OpenGL name with the specified index.

Parameters:
index -
valid -

invalidateName

public final void invalidateName(int index)
Sets the OpenGL name with the specified index.

Parameters:
index -

setNameValid

public final void setNameValid(boolean valid)
Sets the (first) OpenGL name.

Parameters:
valid -

invalidateName

public final void invalidateName()
Sets the (first) OpenGL name.


isNameValid

public final boolean isNameValid(int index)
Parameters:
index -
Returns:
the OpenGL name with the specified index.

isNameValid

public final boolean isNameValid()
Returns:
the (first) OpenGL name.

getNumNames

public final int getNumNames(boolean onlyExisting)

prepareObjectForDestroy

public abstract void prepareObjectForDestroy()

destroyObject

public abstract void destroyObject(int index,
                                   int name)
Destroys this Object in OpenGL.

Parameters:
canvasPeer -
name -

destroyObject

public final void destroyObject()
Destroys this Object in OpenGL.

Parameters:
canvasID -