Class ShaderAppearance


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:

  • Shader program - specifies the shader program...
  • Shader attribute set - specifies the shader parameters, both as explicit attributes and as implicit bindings to Java 3D state...

The ShaderAppearance object modifies the definition of some of the attributes in Appearance:

  • Coloring attributes - XXXXX
  • Line attributes - XXXXX
  • Point attributes - XXXXX
  • Polygon attributes - XXXXX
  • Rendering attributes - XXXXX
  • Transparency attributes - XXXXX
  • Material - XXXXX
  • Texture - XXXXX
  • Texture attributes - XXXXX
  • Texture coordinate generation - XXXXX
  • Texture unit state - XXXXX
Since:
Java 3D 1.4
See Also:
  • Field Details

    • ALLOW_SHADER_PROGRAM_READ

      public static final int ALLOW_SHADER_PROGRAM_READ
      Specifies that this ShaderAppearance object allows reading its ShaderProgram component information.
      See Also:
    • ALLOW_SHADER_PROGRAM_WRITE

      public static final int ALLOW_SHADER_PROGRAM_WRITE
      Specifies that this ShaderAppearance object allows writing its ShaderProgram component information.
      See Also:
    • ALLOW_SHADER_ATTRIBUTE_SET_READ

      public static final int ALLOW_SHADER_ATTRIBUTE_SET_READ
      Specifies that this ShaderAppearance object allows reading its ShaderAttributeSet component information.
      See Also:
    • ALLOW_SHADER_ATTRIBUTE_SET_WRITE

      public static final int ALLOW_SHADER_ATTRIBUTE_SET_WRITE
      Specifies that this ShaderAppearance object allows writing its ShaderAttributeSet component information.
      See Also:
  • Constructor Details

    • ShaderAppearance

      public ShaderAppearance()
      Constructs a ShaderAppearance component object using defaults for all state variables. All component object references are initialized to null.
  • Method Details

    • setShaderProgram

      public void setShaderProgram(ShaderProgram shaderProgram)
      Sets the ShaderProgram object to the specified object. Setting it to null causes a default pass-through shader to be used ???
      Parameters:
      shaderProgram - object that specifies the desired shader program
      Throws:
      CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph
    • getShaderProgram

      public ShaderProgram getShaderProgram()
      Retrieves the current ShaderProgram object.
      Returns:
      the ShaderProgram object
      Throws:
      CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph
    • setShaderAttributeSet

      public void setShaderAttributeSet(ShaderAttributeSet shaderAttributeSet)
      Sets the ShaderAttributeSet object to the specified object. Setting it to null is equivalent to specifying an empty set of attributes.
      Parameters:
      shaderAttributeSet - object that specifies the desired shader attributes
      Throws:
      CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph
    • getShaderAttributeSet

      public ShaderAttributeSet getShaderAttributeSet()
      Retrieves the current ShaderAttributeSet object.
      Returns:
      the ShaderAttributeSet object
      Throws:
      CapabilityNotSetException - if appropriate capability is not set and this object is part of live or compiled scene graph
    • cloneNodeComponent

      public NodeComponent cloneNodeComponent()
      Deprecated.
      replaced with cloneNodeComponent(boolean forceDuplicate)
      Overrides:
      cloneNodeComponent in class Appearance
    • duplicateNodeComponent

      public void duplicateNodeComponent(NodeComponent originalNodeComponent)
      Deprecated.
      replaced with duplicateNodeComponent( NodeComponent originalNodeComponent, boolean forceDuplicate)
      NOTE: Applications should not call this method directly. It should only be called by the cloneNode method.
      Overrides:
      duplicateNodeComponent in class Appearance