com.jme3.renderer
クラス GLObject

java.lang.Object
  上位を拡張 com.jme3.renderer.GLObject
すべての実装されたインタフェース:
java.lang.Cloneable
直系の既知のサブクラス:
FrameBuffer, Image, Shader, Shader.ShaderSource, VertexBuffer

public abstract class GLObject
extends java.lang.Object
implements java.lang.Cloneable

Describes a GL object. An encapsulation of a certain object on the native side of the graphics library. This class is used to track when OpenGL native objects are collected by the garbage collector, and then invoke the proper destructor on the OpenGL library to delete it from memory.


入れ子のクラスの概要
static class GLObject.Type
          The type of the GLObject, usually specified by a subclass.
 
コンストラクタの概要
GLObject(GLObject.Type type)
          Creates a new GLObject with the given type.
 
メソッドの概要
 void clearUpdateNeeded()
          Internal use only.
abstract  GLObject createDestructableClone()
          Creates a shallow clone of this GL Object.
abstract  void deleteObject(Renderer r)
          Deletes the GL object from the GPU when it is no longer used.
 int getId()
           
 boolean isUpdateNeeded()
          Internal use only.
abstract  void resetObject()
          Called when the GL context is restarted to reset all IDs.
 void setId(int id)
          Sets the ID of the GLObject.
 void setUpdateNeeded()
          Internal use only.
 java.lang.String toString()
           
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

コンストラクタの詳細

GLObject

public GLObject(GLObject.Type type)
Creates a new GLObject with the given type. Should be called by the subclasses.

パラメータ:
type - The type that the subclass represents.
メソッドの詳細

setId

public void setId(int id)
Sets the ID of the GLObject. This method is used in Renderer and must not be called by the user.

パラメータ:
id - The ID to set

getId

public int getId()
戻り値:
The ID of the object. Should not be used by user code in most cases.

setUpdateNeeded

public void setUpdateNeeded()
Internal use only. Indicates that the object has changed and its state needs to be updated.


clearUpdateNeeded

public void clearUpdateNeeded()
Internal use only. Indicates that the state changes were applied.


isUpdateNeeded

public boolean isUpdateNeeded()
Internal use only. Check if setUpdateNeeded() was called before.


toString

public java.lang.String toString()
オーバーライド:
クラス java.lang.Object 内の toString

resetObject

public abstract void resetObject()
Called when the GL context is restarted to reset all IDs. Prevents "white textures" on display restart.


deleteObject

public abstract void deleteObject(Renderer r)
Deletes the GL object from the GPU when it is no longer used. Called automatically by the GL object manager.

パラメータ:
r - The renderer to be used to delete the object

createDestructableClone

public abstract GLObject createDestructableClone()
Creates a shallow clone of this GL Object. The deleteObject method should be functional for this object.