com.jme3.shader
クラス Shader

java.lang.Object
  上位を拡張 com.jme3.renderer.GLObject
      上位を拡張 com.jme3.shader.Shader
すべての実装されたインタフェース:
Savable, java.lang.Cloneable

public final class Shader
extends GLObject
implements Savable


入れ子のクラスの概要
static class Shader.ShaderSource
          Shader source describes a shader object in OpenGL.
static class Shader.ShaderType
          Type of shader.
 
クラス com.jme3.renderer.GLObject から継承された入れ子のクラス/インタフェース
GLObject.Type
 
コンストラクタの概要
Shader()
          Do not use this constructor.
Shader(java.lang.String language)
          Create an empty shader.
 
メソッドの概要
 void addSource(Shader.ShaderType type, java.lang.String source)
           
 void addSource(Shader.ShaderType type, java.lang.String source, java.lang.String defines)
           
 void addSource(Shader.ShaderType type, java.lang.String name, java.lang.String source, java.lang.String defines)
          Adds source code to a certain pipeline.
 GLObject createDestructableClone()
          Creates a shallow clone of this GL Object.
 void deleteObject(Renderer r)
          Deletes the GL object from the GPU when it is no longer used.
 Attribute getAttribute(VertexBuffer.Type attribType)
           
 java.lang.String getLanguage()
           
 java.util.Collection<Shader.ShaderSource> getSources()
           
 Uniform getUniform(java.lang.String name)
           
 ListMap<java.lang.String,Uniform> getUniformMap()
           
 boolean isUsable()
          Returns true if this program and all it's shaders have been compiled, linked and validated successfuly.
 void read(JmeImporter im)
           
 void removeUniform(java.lang.String name)
           
 void resetLocations()
          Usually called when the shader itself changes or during any time when the var locations need to be refreshed.
 void resetObject()
          Called by the object manager to reset all object IDs.
 void resetSources()
          Clears all sources.
 void setUpdateNeeded()
          Internal use only.
 void setUsable(boolean usable)
          Sets if the program can be used.
 java.lang.String toString()
           
 void write(JmeExporter ex)
           
 
クラス com.jme3.renderer.GLObject から継承されたメソッド
clearUpdateNeeded, getId, isUpdateNeeded, setId
 
クラス java.lang.Object から継承されたメソッド
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

コンストラクタの詳細

Shader

public Shader(java.lang.String language)
Create an empty shader.


Shader

public Shader()
Do not use this constructor. Serialization purposes only.

メソッドの詳細

write

public void write(JmeExporter ex)
           throws java.io.IOException
定義:
インタフェース Savable 内の write
例外:
java.io.IOException

read

public void read(JmeImporter im)
          throws java.io.IOException
定義:
インタフェース Savable 内の read
例外:
java.io.IOException

addSource

public void addSource(Shader.ShaderType type,
                      java.lang.String name,
                      java.lang.String source,
                      java.lang.String defines)
Adds source code to a certain pipeline.

パラメータ:
type - The pipeline to control
source - The shader source code (in GLSL).

addSource

public void addSource(Shader.ShaderType type,
                      java.lang.String source,
                      java.lang.String defines)

addSource

public void addSource(Shader.ShaderType type,
                      java.lang.String source)

getUniform

public Uniform getUniform(java.lang.String name)

removeUniform

public void removeUniform(java.lang.String name)

getAttribute

public Attribute getAttribute(VertexBuffer.Type attribType)

getUniformMap

public ListMap<java.lang.String,Uniform> getUniformMap()

getSources

public java.util.Collection<Shader.ShaderSource> getSources()

getLanguage

public java.lang.String getLanguage()

toString

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

resetSources

public void resetSources()
Clears all sources. Assuming that they have already been detached and removed on the GL side.


isUsable

public boolean isUsable()
Returns true if this program and all it's shaders have been compiled, linked and validated successfuly.


setUsable

public void setUsable(boolean usable)
Sets if the program can be used. Should only be called by the Renderer.

パラメータ:
usable -

resetLocations

public void resetLocations()
Usually called when the shader itself changes or during any time when the var locations need to be refreshed.


setUpdateNeeded

public void setUpdateNeeded()
クラス GLObject の記述:
Internal use only. Indicates that the object has changed and its state needs to be updated.

オーバーライド:
クラス GLObject 内の setUpdateNeeded

resetObject

public void resetObject()
Called by the object manager to reset all object IDs. This causes the shader to be reuploaded to the GPU incase the display was restarted.

定義:
クラス GLObject 内の resetObject

deleteObject

public void deleteObject(Renderer r)
クラス GLObject の記述:
Deletes the GL object from the GPU when it is no longer used. Called automatically by the GL object manager.

定義:
クラス GLObject 内の deleteObject
パラメータ:
r - The renderer to be used to delete the object

createDestructableClone

public GLObject createDestructableClone()
クラス GLObject の記述:
Creates a shallow clone of this GL Object. The deleteObject method should be functional for this object.

定義:
クラス GLObject 内の createDestructableClone