com.jme.scene
Class VBOInfo

java.lang.Object
  extended by com.jme.scene.VBOInfo
All Implemented Interfaces:
Savable, java.io.Serializable

public class VBOInfo
extends java.lang.Object
implements java.io.Serializable, Savable

VBOInfo provides a single class for dealing with the VBO characteristics of a Geometry object(s)

Version:
$Id: VBOInfo.java 4131 2009-03-19 20:15:28Z blaine.dev $
Author:
Joshua Slack, Tijl Houtbeckers - Support for indices.
See Also:
Serialized Form

Constructor Summary
VBOInfo()
           
VBOInfo(boolean defaultVBO)
          Create a VBOInfo object that sets VBO to enabled or disabled for all types except Index, which is always disabled unless set with setVBOIndexEnabled(true)
 
Method Summary
 VBOInfo copy()
          Creates a copy of this VBOInfo.
 java.lang.Class<? extends VBOInfo> getClassTag()
           
 int getVBOColorID()
           
 int getVBOFogCoordsID()
           
 int getVBOIndexID()
           
 int getVBONormalID()
           
 int getVBOTextureID(int index)
           
 int getVBOVertexID()
           
 boolean isVBOColorEnabled()
          Returns true if VBO (Vertex Buffer) is enabled for color information.
 boolean isVBOFogCoordsEnabled()
          Returns true if VBO (Vertex Buffer) is enabled for fog coords information.
 boolean isVBOIndexEnabled()
          Returns true if VBO (Vertex Buffer) is enabled for indices information.
 boolean isVBONormalEnabled()
          Returns true if VBO (Vertex Buffer) is enabled for normal information.
 boolean isVBOTextureEnabled()
          Returns true if VBO (Vertex Buffer) is enabled for texture information.
 boolean isVBOVertexEnabled()
          Returns true if VBO (Vertex Buffer) is enabled for vertex information.
 void read(JMEImporter e)
           
 void resizeTextureIds(int size)
          resizeTextureIds forces the texid array to be the given size, maintaining any old id values that can fit in the new sized array.
 void setVBOColorEnabled(boolean enabled)
          Enables or disables Vertex Buffer Objects for color information.
 void setVBOColorID(int id)
           
 void setVBOFogCoordsEnabled(boolean enabled)
          Enables or disables Vertex Buffer Objects for fog coords information.
 void setVBOFogCoordsID(int id)
           
 void setVBOIndexEnabled(boolean enabled)
          Enables or disables Vertex Buffer Objects for indices information.
 void setVBOIndexID(int id)
           
 void setVBONormalEnabled(boolean enabled)
          Enables or disables Vertex Buffer Objects for normal information.
 void setVBONormalID(int id)
           
 void setVBOTextureEnabled(boolean enabled)
          Enables or disables Vertex Buffer Objects for texture coordinate information.
 void setVBOTextureID(int index, int id)
           
 void setVBOVertexEnabled(boolean enabled)
          Enables or disables Vertex Buffer Objects for vertex information.
 void setVBOVertexID(int id)
           
 void write(JMEExporter e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VBOInfo

public VBOInfo()

VBOInfo

public VBOInfo(boolean defaultVBO)
Create a VBOInfo object that sets VBO to enabled or disabled for all types except Index, which is always disabled unless set with setVBOIndexEnabled(true)

Parameters:
defaultVBO - true for enabled, false for disabled.
Method Detail

copy

public VBOInfo copy()
Creates a copy of this VBOInfo. Does not copy any IDs.

Returns:
a copy of this VBOInfo instance

resizeTextureIds

public void resizeTextureIds(int size)
resizeTextureIds forces the texid array to be the given size, maintaining any old id values that can fit in the new sized array. size of 0 is ignored.

Parameters:
size - new size of texcoord id array

isVBOVertexEnabled

public boolean isVBOVertexEnabled()
Returns true if VBO (Vertex Buffer) is enabled for vertex information. This is used during rendering.

Returns:
If VBO is enabled for vertexes.

isVBOFogCoordsEnabled

public boolean isVBOFogCoordsEnabled()
Returns true if VBO (Vertex Buffer) is enabled for fog coords information. This is used during rendering.

Returns:
If VBO is enabled for fog coords.

isVBOIndexEnabled

public boolean isVBOIndexEnabled()
Returns true if VBO (Vertex Buffer) is enabled for indices information. This is used during rendering.

Returns:
If VBO is enabled for indices.

isVBOTextureEnabled

public boolean isVBOTextureEnabled()
Returns true if VBO (Vertex Buffer) is enabled for texture information. This is used during rendering.

Returns:
If VBO is enabled for textures.

isVBONormalEnabled

public boolean isVBONormalEnabled()
Returns true if VBO (Vertex Buffer) is enabled for normal information. This is used during rendering.

Returns:
If VBO is enabled for normals.

isVBOColorEnabled

public boolean isVBOColorEnabled()
Returns true if VBO (Vertex Buffer) is enabled for color information. This is used during rendering.

Returns:
If VBO is enabled for colors.

setVBOVertexEnabled

public void setVBOVertexEnabled(boolean enabled)
Enables or disables Vertex Buffer Objects for vertex information.

Parameters:
enabled - If true, VBO enabled for vertexes.

setVBOFogCoordsEnabled

public void setVBOFogCoordsEnabled(boolean enabled)
Enables or disables Vertex Buffer Objects for fog coords information.

Parameters:
enabled - If true, VBO enabled for fog coords.

setVBOIndexEnabled

public void setVBOIndexEnabled(boolean enabled)
Enables or disables Vertex Buffer Objects for indices information.

Parameters:
enabled - If true, VBO enabled for indices.

setVBOTextureEnabled

public void setVBOTextureEnabled(boolean enabled)
Enables or disables Vertex Buffer Objects for texture coordinate information.

Parameters:
enabled - If true, VBO enabled for texture coordinates.

setVBONormalEnabled

public void setVBONormalEnabled(boolean enabled)
Enables or disables Vertex Buffer Objects for normal information.

Parameters:
enabled - If true, VBO enabled for normals

setVBOColorEnabled

public void setVBOColorEnabled(boolean enabled)
Enables or disables Vertex Buffer Objects for color information.

Parameters:
enabled - If true, VBO enabled for colors

getVBOVertexID

public int getVBOVertexID()

getVBOTextureID

public int getVBOTextureID(int index)

getVBONormalID

public int getVBONormalID()

getVBOFogCoordsID

public int getVBOFogCoordsID()

getVBOColorID

public int getVBOColorID()

setVBOVertexID

public void setVBOVertexID(int id)

setVBOTextureID

public void setVBOTextureID(int index,
                            int id)

setVBONormalID

public void setVBONormalID(int id)

setVBOFogCoordsID

public void setVBOFogCoordsID(int id)

setVBOColorID

public void setVBOColorID(int id)

getVBOIndexID

public int getVBOIndexID()

setVBOIndexID

public void setVBOIndexID(int id)

write

public void write(JMEExporter e)
           throws java.io.IOException
Specified by:
write in interface Savable
Throws:
java.io.IOException

read

public void read(JMEImporter e)
          throws java.io.IOException
Specified by:
read in interface Savable
Throws:
java.io.IOException

getClassTag

public java.lang.Class<? extends VBOInfo> getClassTag()
Specified by:
getClassTag in interface Savable