public class ShaderAppearance extends Appearance
The ShaderAppearance object defines programmable shading attributes that can be set as a component object of a Shape3D node. The ShaderAppearance rendering state adds the following attributes in addition to those defined by Appearance:
The ShaderAppearance object modifies the definition of some of the attributes in Appearance:
ShaderProgram
,
ShaderAttributeSet
Modifier and Type | Field and Description |
---|---|
static int |
ALLOW_SHADER_ATTRIBUTE_SET_READ
Specifies that this ShaderAppearance object allows reading its
ShaderAttributeSet component information.
|
static int |
ALLOW_SHADER_ATTRIBUTE_SET_WRITE
Specifies that this ShaderAppearance object allows writing its
ShaderAttributeSet component information.
|
static int |
ALLOW_SHADER_PROGRAM_READ
Specifies that this ShaderAppearance object allows reading its
ShaderProgram component information.
|
static int |
ALLOW_SHADER_PROGRAM_WRITE
Specifies that this ShaderAppearance object allows writing its
ShaderProgram component information.
|
ALLOW_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 |
---|
ShaderAppearance()
Constructs a ShaderAppearance component object using defaults for all
state variables.
|
Modifier and Type | Method and Description |
---|---|
NodeComponent |
cloneNodeComponent()
Deprecated.
replaced with cloneNodeComponent(boolean forceDuplicate)
|
void |
duplicateNodeComponent(NodeComponent originalNodeComponent)
Deprecated.
replaced with duplicateNodeComponent(
NodeComponent originalNodeComponent, boolean forceDuplicate)
|
ShaderAttributeSet |
getShaderAttributeSet()
Retrieves the current ShaderAttributeSet object.
|
ShaderProgram |
getShaderProgram()
Retrieves the current ShaderProgram object.
|
void |
setShaderAttributeSet(ShaderAttributeSet shaderAttributeSet)
Sets the ShaderAttributeSet object to the specified object.
|
void |
setShaderProgram(ShaderProgram shaderProgram)
Sets the ShaderProgram object to the specified object.
|
getColoringAttributes, getLineAttributes, getMaterial, getPointAttributes, getPolygonAttributes, getRenderingAttributes, getTexCoordGeneration, getTexture, getTextureAttributes, getTextureUnitCount, getTextureUnitState, getTextureUnitState, getTransparencyAttributes, setColoringAttributes, setLineAttributes, setMaterial, setPointAttributes, setPolygonAttributes, setRenderingAttributes, setTexCoordGeneration, setTexture, setTextureAttributes, setTextureUnitState, setTextureUnitState, setTransparencyAttributes
cloneNodeComponent, duplicateNodeComponent, getDuplicateOnCloneTree, setDuplicateOnCloneTree
clearCapability, clearCapabilityIsFrequent, duplicateSceneGraphObject, getCapability, getCapabilityIsFrequent, getName, getUserData, isCompiled, isLive, setCapability, setCapabilityIsFrequent, setName, setUserData, toString, updateNodeReferences
public static final int ALLOW_SHADER_PROGRAM_READ
public static final int ALLOW_SHADER_PROGRAM_WRITE
public static final int ALLOW_SHADER_ATTRIBUTE_SET_READ
public static final int ALLOW_SHADER_ATTRIBUTE_SET_WRITE
public ShaderAppearance()
public void setShaderProgram(ShaderProgram shaderProgram)
shaderProgram
- object that specifies the desired shader programCapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic ShaderProgram getShaderProgram()
CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic void setShaderAttributeSet(ShaderAttributeSet shaderAttributeSet)
shaderAttributeSet
- object that specifies the desired shader attributesCapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic ShaderAttributeSet getShaderAttributeSet()
CapabilityNotSetException
- if appropriate capability is
not set and this object is part of live or compiled scene graphpublic NodeComponent cloneNodeComponent()
cloneNodeComponent
in class Appearance
public void duplicateNodeComponent(NodeComponent originalNodeComponent)
duplicateNodeComponent
in class Appearance
Copyright © 2016–2022 SciJava. All rights reserved.