|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object codeanticode.glgraphics.GLCgFXEffect
public class GLCgFXEffect
This class encapsulates a CgFX shader effect. Based in the code by Victor Martins (http://www.pixelnerve.com/v/)
Field Summary |
---|
Constructor Summary | |
---|---|
GLCgFXEffect(processing.core.PApplet parent,
java.lang.String fn)
Creates an instance of GLCgFXEffect, reading the effect from file. |
Method Summary | |
---|---|
void |
delete()
Releases the OpenGL resources associated to this effect. |
int |
getCgMatrixTransform(int glcode)
|
CGeffect |
getEffect()
Returns the internal CGeffect object that encapsulates the CgFX effect. |
void |
resetSelectedPass()
Resets the currently selected pass in the current technique. |
boolean |
selectFirstPass()
Selects the first pass in the current technique. |
boolean |
selectNextPass()
Selects the next pass in the current technique. |
void |
setFirstTechnique()
Sets for use the first technique contained in the effect. |
void |
setFloatParameter(java.lang.String param,
float x)
Sets the float parameter with name to the given value |
void |
setFloatParameterBySemantic(java.lang.String semantic,
float x)
Sets the float parameter with indicated semantic to the given value |
void |
setIntParameter(java.lang.String param,
int x)
Sets the int parameter with name to the given value |
void |
setIntParameterBySemantic(java.lang.String semantic,
int x)
Sets the int parameter with indicated semantic to the given value |
void |
setMatParameter(java.lang.String param,
float m00,
float m01,
float m10,
float m11)
Sets the mat2 parameter with name to the given values |
void |
setMatParameter(java.lang.String param,
float m00,
float m01,
float m02,
float m10,
float m11,
float m12,
float m20,
float m21,
float m22)
Sets the mat3 parameter with name to the given value |
void |
setMatParameter(java.lang.String param,
float m00,
float m01,
float m02,
float m03,
float m10,
float m11,
float m12,
float m13,
float m20,
float m21,
float m22,
float m23,
float m30,
float m31,
float m32,
float m33)
Sets the mat4 parameter with name to the given value |
void |
setMatParameterBySemantic(java.lang.String semantic,
float m00,
float m01,
float m10,
float m11)
Sets the mat2 parameter with indicated semantic to the given values |
void |
setMatParameterBySemantic(java.lang.String semantic,
float m00,
float m01,
float m02,
float m10,
float m11,
float m12,
float m20,
float m21,
float m22)
Sets the mat3 parameter with indicated semantic to the given values |
void |
setMatParameterBySemantic(java.lang.String semantic,
float m00,
float m01,
float m02,
float m03,
float m10,
float m11,
float m12,
float m13,
float m20,
float m21,
float m22,
float m23,
float m30,
float m31,
float m32,
float m33)
Sets the mat4 parameter with indicated semantic to the given values |
void |
setMatrixParameterBySemantic(java.lang.String semantic,
float[] mat)
Sets the matrix parameter with indicated semantic to the given values |
void |
setMatrixParameterBySemantic(java.lang.String semantic,
int matrix)
Sets the matrix parameter identified by semantic, and adding no post-transformation to the matrix. |
void |
setMatrixParameterBySemantic(java.lang.String semantic,
int matrix,
int gltransform)
Sets the parameter with the given semantic with the current contents of the specified matrix, applying a certain transformation. |
void |
setModelviewMatrix(java.lang.String param)
Sets the parameter param with the current contents of the OpenGL modelview matrix. |
void |
setModelviewMatrixBySemantic(java.lang.String semantic)
Passes OpenGL's modelview matrix to the Cg parameter identified by semantic, and adding no post-transformation to the matrix. |
void |
setModelviewMatrixBySemantic(java.lang.String semantic,
int gltransform)
Sets the parameter with the given semantic with the current contents of the modelview matrix, applying a certain transformation. |
void |
setModelviewProjectionMatrix(java.lang.String param)
Sets the parameter param with the current contents of the OpenGL modelview-projection matrix. |
void |
setModelviewProjectionMatrixBySemantic(java.lang.String semantic)
Passes OpenGL's modelview-projection matrix to the Cg parameter identified by semantic, and adding no post-transformation to the matrix. |
void |
setModelviewProjectionMatrixBySemantic(java.lang.String semantic,
int gltransform)
Sets the parameter with the given semantic with the current contents of the modelview-projection matrix, applying a certain transformation. |
void |
setProjectionMatrix(java.lang.String param)
Sets the parameter param with the current contents of the OpenGL projection matrix. |
void |
setProjectionMatrixBySemantic(java.lang.String semantic)
Passes OpenGL's projection matrix to the Cg parameter identified by semantic, and adding no post-transformation to the matrix. |
void |
setProjectionMatrixBySemantic(java.lang.String semantic,
int gltransform)
Sets the parameter with the given semantic with the current contents of the projection matrix, applying a certain transformation. |
void |
setSelectedPass()
Sets for use the currently selected pass in the current technique. |
void |
setTechnique(java.lang.String name)
Sets for use the technique contained in the effect with the specified name. |
void |
setTexMatrix(java.lang.String param)
Sets the parameter param with the current contents of the OpenGL texture matrix. |
void |
setTexParameter(java.lang.String param,
GLTexture tex)
Set the given texture for the parameter param. |
void |
setTexParameterBySemantic(java.lang.String semantic,
GLTexture tex)
Sets the parameter with indicated semantic to the given texture |
void |
setTextureMatrixBySemantic(java.lang.String semantic)
Passes OpenGL's texture matrix to the Cg parameter identified by semantic, and adding no post-transformation to the matrix. |
void |
setTextureMatrixBySemantic(java.lang.String semantic,
int gltransform)
Sets the parameter with the given semantic with the current contents of the texture matrix, applying a certain transformation. |
void |
setVecParameter(java.lang.String param,
float x,
float y)
Sets the vec2 parameter with name to the given values |
void |
setVecParameter(java.lang.String param,
float x,
float y,
float z)
Sets the vec3 parameter with name to the given values |
void |
setVecParameter(java.lang.String param,
float x,
float y,
float z,
float w)
Sets the vec4 parameter with name to the given values |
void |
setVecParameterBySemantic(java.lang.String semantic,
float x,
float y)
Sets the vec2 parameter with indicated semantic to the given values |
void |
setVecParameterBySemantic(java.lang.String semantic,
float x,
float y,
float z)
Sets the vec3 parameter with indicated semantic to the given values |
void |
setVecParameterBySemantic(java.lang.String semantic,
float x,
float y,
float z,
float w)
Sets the vec4 parameter with indicated semantic to the given values |
void |
start()
Starts effect execution. |
void |
stop()
Stops effect execution. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GLCgFXEffect(processing.core.PApplet parent, java.lang.String fn)
parent
- PAppletfn
- StringMethod Detail |
---|
public void delete()
public CGeffect getEffect()
public void start()
public void stop()
public void setFirstTechnique()
public void setTechnique(java.lang.String name)
name
- Stringpublic void setSelectedPass()
public void resetSelectedPass()
public boolean selectFirstPass()
public boolean selectNextPass()
public void setTexParameter(java.lang.String param, GLTexture tex)
public void setIntParameter(java.lang.String param, int x)
name
- Stringx
- intpublic void setFloatParameter(java.lang.String param, float x)
name
- Stringx
- floatpublic void setVecParameter(java.lang.String param, float x, float y)
name
- Stringx
- floaty
- floatpublic void setVecParameter(java.lang.String param, float x, float y, float z)
name
- Stringx
- floaty
- floatz
- floatpublic void setVecParameter(java.lang.String param, float x, float y, float z, float w)
name
- Stringx
- floaty
- floatz
- floatw
- floatpublic void setMatParameter(java.lang.String param, float m00, float m01, float m10, float m11)
name
- Stringm00
- float
...public void setMatParameter(java.lang.String param, float m00, float m01, float m02, float m10, float m11, float m12, float m20, float m21, float m22)
name
- Stringm00
- float
...public void setMatParameter(java.lang.String param, float m00, float m01, float m02, float m03, float m10, float m11, float m12, float m13, float m20, float m21, float m22, float m23, float m30, float m31, float m32, float m33)
name
- Stringm00
- float
...public void setModelviewMatrix(java.lang.String param)
param
- Stringpublic void setProjectionMatrix(java.lang.String param)
param
- Stringpublic void setModelviewProjectionMatrix(java.lang.String param)
param
- Stringpublic void setTexMatrix(java.lang.String param)
param
- Stringpublic void setMatrixParameterBySemantic(java.lang.String semantic, int matrix)
semantic
- name string of the semantic attached to the parametermatrix
- intpublic void setMatrixParameterBySemantic(java.lang.String semantic, int matrix, int gltransform)
semantic
- Stringmatrix
- intgltransform
- intpublic void setModelviewMatrixBySemantic(java.lang.String semantic)
semantic
- name string of the semantic attached to the parameterpublic void setModelviewMatrixBySemantic(java.lang.String semantic, int gltransform)
semantic
- Stringgltransform
- intpublic void setProjectionMatrixBySemantic(java.lang.String semantic)
semantic
- name string of the semantic attached to the parameterpublic void setProjectionMatrixBySemantic(java.lang.String semantic, int gltransform)
semantic
- Stringgltransform
- intpublic void setModelviewProjectionMatrixBySemantic(java.lang.String semantic)
semantic
- name string of the semantic attached to the parameterpublic void setModelviewProjectionMatrixBySemantic(java.lang.String semantic, int gltransform)
semantic
- Stringgltransform
- intpublic void setTextureMatrixBySemantic(java.lang.String semantic)
semantic
- name string of the semantic attached to the parameterpublic void setTextureMatrixBySemantic(java.lang.String semantic, int gltransform)
semantic
- Stringgltransform
- intpublic void setTexParameterBySemantic(java.lang.String semantic, GLTexture tex)
semantic
- Stringtex
- GLTexturepublic void setIntParameterBySemantic(java.lang.String semantic, int x)
semantic
- Stringx
- intpublic void setFloatParameterBySemantic(java.lang.String semantic, float x)
semantic
- Stringx
- floatpublic void setVecParameterBySemantic(java.lang.String semantic, float x, float y)
semantic
- Stringx
- floaty
- floatpublic void setVecParameterBySemantic(java.lang.String semantic, float x, float y, float z)
semantic
- Stringx
- floaty
- floatz
- floatpublic void setVecParameterBySemantic(java.lang.String semantic, float x, float y, float z, float w)
semantic
- Stringx
- floaty
- floatz
- floatw
- floatpublic void setMatParameterBySemantic(java.lang.String semantic, float m00, float m01, float m10, float m11)
semantic
- Stringm00
- float
...public void setMatParameterBySemantic(java.lang.String semantic, float m00, float m01, float m02, float m10, float m11, float m12, float m20, float m21, float m22)
semantic
- Stringm00
- float
...public void setMatParameterBySemantic(java.lang.String semantic, float m00, float m01, float m02, float m03, float m10, float m11, float m12, float m13, float m20, float m21, float m22, float m23, float m30, float m31, float m32, float m33)
semantic
- Stringm00
- float
...public void setMatrixParameterBySemantic(java.lang.String semantic, float[] mat)
semantic
- Stringmat
- float[]public int getCgMatrixTransform(int glcode)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |