public class SimpleShaderAppearance extends ShaderAppearance
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
alphaTestMethod |
static java.lang.String |
alphaTestUniforms |
static java.lang.String |
glFrontMaterial |
static java.lang.String |
glLightSource |
ALLOW_SHADER_ATTRIBUTE_SET_READ, ALLOW_SHADER_ATTRIBUTE_SET_WRITE, ALLOW_SHADER_PROGRAM_READ, ALLOW_SHADER_PROGRAM_WRITEALLOW_COLORING_ATTRIBUTES_READ, ALLOW_COLORING_ATTRIBUTES_WRITE, ALLOW_LINE_ATTRIBUTES_READ, ALLOW_LINE_ATTRIBUTES_WRITE, ALLOW_MATERIAL_READ, ALLOW_MATERIAL_WRITE, ALLOW_POINT_ATTRIBUTES_READ, ALLOW_POINT_ATTRIBUTES_WRITE, ALLOW_POLYGON_ATTRIBUTES_READ, ALLOW_POLYGON_ATTRIBUTES_WRITE, ALLOW_RENDERING_ATTRIBUTES_READ, ALLOW_RENDERING_ATTRIBUTES_WRITE, ALLOW_TEXGEN_READ, ALLOW_TEXGEN_WRITE, ALLOW_TEXTURE_ATTRIBUTES_READ, ALLOW_TEXTURE_ATTRIBUTES_WRITE, ALLOW_TEXTURE_READ, ALLOW_TEXTURE_UNIT_STATE_READ, ALLOW_TEXTURE_UNIT_STATE_WRITE, ALLOW_TEXTURE_WRITE, ALLOW_TRANSPARENCY_ATTRIBUTES_READ, ALLOW_TRANSPARENCY_ATTRIBUTES_WRITE| Constructor and Description |
|---|
SimpleShaderAppearance()
This will define the shader code based on the attributes set
|
SimpleShaderAppearance(boolean lit,
boolean hasTexture) |
SimpleShaderAppearance(Color3f color)
Lines with a single color no texture, ignores vertex attribute of color
|
| Modifier and Type | Method and Description |
|---|---|
NodeComponent |
cloneNodeComponent()
Must implement or clones turn out to be ShaderAppearance
|
java.lang.String |
getFragmentShaderSource() |
java.lang.String |
getVertexShaderSource() |
void |
rebuildShaders() |
void |
setColoringAttributes(ColoringAttributes coloringAttributes)
Sets the coloringAttributes object to the specified object.
|
void |
setLineAttributes(LineAttributes lineAttributes)
Sets the lineAttributes object to the specified object.
|
void |
setMaterial(Material material)
Sets the material object to the specified object.
|
void |
setPointAttributes(PointAttributes pointAttributes)
Sets the pointAttributes object to the specified object.
|
void |
setPolygonAttributes(PolygonAttributes polygonAttributes)
Sets the polygonAttributes object to the specified object.
|
void |
setRenderingAttributes(RenderingAttributes renderingAttributes)
Sets the renderingAttributes object to the specified object.
|
void |
setTexCoordGeneration(TexCoordGeneration texCoordGeneration)
Sets the texCoordGeneration object to the specified object.
|
void |
setTexture(Texture texture)
Sets the texture object to the specified object.
|
void |
setTextureAttributes(TextureAttributes textureAttributes)
Note if the texture transform is updated after the TextureAttributes are set then
rebuild will need to be called on this Appearance
|
void |
setTextureUnitState(int index,
TextureUnitState state)
Sets the texture unit state object at the specified index
within the texture unit state array to the specified object.
|
void |
setTextureUnitState(TextureUnitState[] stateArray)
Sets the texture unit state array for this appearance object to the
specified array.
|
void |
setTransparencyAttributes(TransparencyAttributes transparencyAttributes)
Sets the transparencyAttributes object to the specified object.
|
void |
setUpdatableCapabilities() |
static void |
setVersion120() |
static void |
setVersionES100() |
static void |
setVersionES300() |
duplicateNodeComponent, getShaderAttributeSet, getShaderProgram, setShaderAttributeSet, setShaderProgramgetColoringAttributes, getLineAttributes, getMaterial, getPointAttributes, getPolygonAttributes, getRenderingAttributes, getTexCoordGeneration, getTexture, getTextureAttributes, getTextureUnitCount, getTextureUnitState, getTextureUnitState, getTransparencyAttributescloneNodeComponent, duplicateNodeComponent, getDuplicateOnCloneTree, setDuplicateOnCloneTreeclearCapability, clearCapabilityIsFrequent, getCapability, getCapabilityIsFrequent, getName, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setName, setUserData, toString, updateNodeReferencespublic static java.lang.String alphaTestUniforms
public static java.lang.String alphaTestMethod
public static java.lang.String glFrontMaterial
public static java.lang.String glLightSource
public SimpleShaderAppearance()
public SimpleShaderAppearance(Color3f color)
color - public SimpleShaderAppearance(boolean lit,
boolean hasTexture)
public static void setVersionES100()
public static void setVersionES300()
public static void setVersion120()
public java.lang.String getVertexShaderSource()
public java.lang.String getFragmentShaderSource()
public void setUpdatableCapabilities()
public void rebuildShaders()
public void setMaterial(Material material)
AppearancesetMaterial in class Appearancematerial - object that specifies the desired material
propertiespublic void setColoringAttributes(ColoringAttributes coloringAttributes)
AppearancesetColoringAttributes in class AppearancecoloringAttributes - object that specifies the desired
coloringAttributes parameterspublic void setTransparencyAttributes(TransparencyAttributes transparencyAttributes)
AppearancesetTransparencyAttributes in class AppearancetransparencyAttributes - object that specifies the desired
transparencyAttributes parameterspublic void setRenderingAttributes(RenderingAttributes renderingAttributes)
AppearancesetRenderingAttributes in class AppearancerenderingAttributes - object that specifies the desired
renderingAttributes parameterspublic void setPolygonAttributes(PolygonAttributes polygonAttributes)
AppearancesetPolygonAttributes in class AppearancepolygonAttributes - object that specifies the desired
polygonAttributes parameterspublic void setLineAttributes(LineAttributes lineAttributes)
AppearancesetLineAttributes in class AppearancelineAttributes - object that specifies the desired
lineAttributes parameterspublic void setPointAttributes(PointAttributes pointAttributes)
AppearancesetPointAttributes in class AppearancepointAttributes - object that specifies the desired
pointAttributes parameterspublic void setTexture(Texture texture)
AppearanceApplications must not set individual texture component objects (texture, textureAttributes, or texCoordGeneration) and the texture unit state array in the same Appearance object. Doing so will result in an exception being thrown.
setTexture in class Appearancetexture - object that specifies the desired texture
map and texture parameterspublic void setTextureAttributes(TextureAttributes textureAttributes)
setTextureAttributes in class AppearancetextureAttributes - object that specifies the desired
textureAttributes map and textureAttributes parameterspublic void setTexCoordGeneration(TexCoordGeneration texCoordGeneration)
AppearanceApplications must not set individual texture component objects (texture, textureAttributes, or texCoordGeneration) and the texture unit state array in the same Appearance object. Doing so will result in an exception being thrown.
setTexCoordGeneration in class AppearancetexCoordGeneration - object that specifies the texture coordinate
generation parameterspublic void setTextureUnitState(TextureUnitState[] stateArray)
AppearanceApplications must not set individual texture component objects (texture, textureAttributes, or texCoordGeneration) and the texture unit state array in the same Appearance object. Doing so will result in an exception being thrown.
setTextureUnitState in class AppearancestateArray - array of TextureUnitState objects that
specify the desired texture state for each unit. The length of
this array specifies the maximum number of texture units that
will be used by this appearance object. The texture units are
numbered from 0 through
stateArray.length-1.public void setTextureUnitState(int index,
TextureUnitState state)
Appearance[0, stateArray.length-1].setTextureUnitState in class Appearanceindex - the array index of the object to be setstate - new texture unit state objectpublic NodeComponent cloneNodeComponent()
cloneNodeComponent in class ShaderAppearance