com.jme3.renderer.layer
インタフェース MeshLayer


public interface MeshLayer

Layer for handling meshes.


メソッドの概要
 void clearVertexAttribs()
          Clears all vertex attributes set with setVertexAttrib.
 void deleteBuffer(VertexBuffer vb)
          Deletes a vertex buffer from the GPU.
 void drawTriangleList(VertexBuffer indexBuf, Mesh.Mode mode, int count, int vertCount)
          Draws the list of triangles given in the index buffer.
 void renderMesh(Mesh mesh, int count)
          Renders count meshes, with the geometry data supplied.
 void setVertexAttrib(VertexBuffer vb)
          Sets the vertex attrib.
 void updateBufferData(VertexBuffer vb)
          Uploads the vertex buffer's data onto the GPU, assiging it an ID if needed.
 

メソッドの詳細

updateBufferData

void updateBufferData(VertexBuffer vb)
Uploads the vertex buffer's data onto the GPU, assiging it an ID if needed.


deleteBuffer

void deleteBuffer(VertexBuffer vb)
Deletes a vertex buffer from the GPU.

パラメータ:
vb - The vertex buffer to delete

setVertexAttrib

void setVertexAttrib(VertexBuffer vb)
Sets the vertex attrib. This data is exposed in the shader depending on type, e.g Type.Position would be given as inPosition, Type.Tangent is given as inTangent, etc.

パラメータ:
vb -
例外:
InvalidArgumentException - If the given vertex buffer is an index buffer.

drawTriangleList

void drawTriangleList(VertexBuffer indexBuf,
                      Mesh.Mode mode,
                      int count,
                      int vertCount)
Draws the list of triangles given in the index buffer. Each triangle is composed of 3 indices to a vertex, the attribs of which are supplied using setVertexAttrib. The int variable gl_VertexID can be used to access the current vertex index inside the vertex shader.

パラメータ:
count - The number of instances to draw

clearVertexAttribs

void clearVertexAttribs()
Clears all vertex attributes set with setVertexAttrib.


renderMesh

void renderMesh(Mesh mesh,
                int count)
Renders count meshes, with the geometry data supplied. The shader which is currently set with setShader is responsible for transforming the input verticies into clip space and shading it based on the given vertex attributes. The int variable gl_InstanceID can be used to access the current instance of the mesh being rendered inside the vertex shader.

パラメータ:
mesh -
count -