Package javax.media.j3d
Class ShaderError
java.lang.Object
javax.media.j3d.ShaderError
ShaderError is a container object that holds the details of
a runtime error that occurs while compiling or executing a
programmable shader.
- Since:
- Java 3D 1.4
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Indicates that an error occurred while compiling a shader.static final int
Indicates that an error occurred while linking a shader.static final int
Indicates that no error occurred.static final int
Indicates a error in looking up the location of a uniform shader attribute name within a given shader program.static final int
Indicates a error caused by a ShaderAttribute whose name does not appear in the list of shader attribute names in the corresponding ShaderProgram object.static final int
Indicates a error in the type of the attribute versus what the shader program was expecting.static final int
Indicates that the specified shading language is not supported on the screen display device.static final int
Indicates a error in looking up a vertex attribute name within a given shader program. -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new ShaderError object indicating no error.ShaderError
(int errorCode, String errorMessage) Constructs a new ShaderError object with the given error code and message. -
Method Summary
Modifier and TypeMethodDescriptionReturns the canvas associated with this shader error.Returns the detail message for this shader error.int
Returns the error code for this shader error.Returns the error message for this shader error.Returns the geometry associated with this shader error.Returns the shader object associated with this shader error.Returns the shader appearance associated with this shader error.Returns the shader attribute associated with this shader error.Returns the shader attribute set associated with this shader error.Returns the shader program associated with this shader error.Returns the shape node associated with this shader error.void
Prints a verbose error report to System.err.void
printVerbose
(PrintStream printStream) Prints a verbose error report to the specified PrintStream.void
setCanvas3D
(Canvas3D canvas) Sets the canvas associated with this shader error.void
setDetailMessage
(String detailMessage) Sets the detail message for this shader error.void
setErrorCode
(int errorCode) Sets the error code for this shader error.void
setErrorMessage
(String errorMessage) Sets the error message for this shader error.void
setGeometry
(Geometry geometry) Sets the geometry associated with this shader error.void
Sets the shader object associated with this shader error.void
setShaderAppearance
(ShaderAppearance shaderApp) Sets the shader appearance associated with this shader error.void
setShaderAttribute
(ShaderAttribute shaderAttribute) Sets the shader attribute associated with this shader error.void
setShaderAttributeSet
(ShaderAttributeSet shaderAttributeSet) Sets the shader attribute set associated with this shader error.void
setShaderProgram
(ShaderProgram shaderProgram) Sets the shader program associated with this shader error.void
setShape3D
(Shape3D shape) Sets the shape node associated with this shader error.toString()
Returns a short string that describes this shader error.
-
Field Details
-
NO_ERROR
Indicates that no error occurred.- See Also:
-
COMPILE_ERROR
Indicates that an error occurred while compiling a shader.- See Also:
-
LINK_ERROR
Indicates that an error occurred while linking a shader.- See Also:
-
VERTEX_ATTRIBUTE_LOOKUP_ERROR
Indicates a error in looking up a vertex attribute name within a given shader program.- See Also:
-
SHADER_ATTRIBUTE_LOOKUP_ERROR
Indicates a error in looking up the location of a uniform shader attribute name within a given shader program.- See Also:
-
SHADER_ATTRIBUTE_NAME_NOT_SET_ERROR
Indicates a error caused by a ShaderAttribute whose name does not appear in the list of shader attribute names in the corresponding ShaderProgram object.- See Also:
-
SHADER_ATTRIBUTE_TYPE_ERROR
Indicates a error in the type of the attribute versus what the shader program was expecting.- See Also:
-
UNSUPPORTED_LANGUAGE_ERROR
Indicates that the specified shading language is not supported on the screen display device.- See Also:
-
-
Constructor Details
-
ShaderError
public ShaderError()Constructs a new ShaderError object indicating no error. The error code is set toNO_ERROR
. All other fields are initialized to null, including the error message. -
ShaderError
Constructs a new ShaderError object with the given error code and message. All other fields are initialized to null.- Parameters:
errorCode
- the error code for this shader error.errorMessage
- a short error message describing this shader error.
-
-
Method Details
-
printVerbose
public void printVerbose()Prints a verbose error report to System.err. This verbose output includes the error code, error message, detail message, and all relevant Java 3D objects. -
printVerbose
Prints a verbose error report to the specified PrintStream. This verbose output includes the error code, error message, detail message, and all relevant Java 3D objects.- Parameters:
printStream
- the print stream on which to print the error report.
-
setErrorCode
public void setErrorCode(int errorCode) Sets the error code for this shader error. This represents the type of error that occurred.- Parameters:
errorCode
- the error code for this shader error.
-
getErrorCode
public int getErrorCode()Returns the error code for this shader error.- Returns:
- the error code.
-
setErrorMessage
Sets the error message for this shader error. This is a short message describing the error, and is included as part of toString().- Parameters:
errorMessage
- a short error message describing this shader error.
-
getErrorMessage
Returns the error message for this shader error.- Returns:
- a short error message describing this shader error.
-
setDetailMessage
Sets the detail message for this shader error. This is a detailed error message, typically produced by the shader compiler, and is not included as part of toString().- Parameters:
detailMessage
- a detailed message describing this shader error in more detail.
-
getDetailMessage
Returns the detail message for this shader error.- Returns:
- the detail message for this shader error.
-
setCanvas3D
Sets the canvas associated with this shader error.- Parameters:
canvas
- the canvas associated with this shader error.
-
getCanvas3D
Returns the canvas associated with this shader error.- Returns:
- the canvas associated with this shader error.
-
setShape3D
Sets the shape node associated with this shader error.- Parameters:
shape
- the shape node associated with this shader error.
-
getShape3D
Returns the shape node associated with this shader error.- Returns:
- the shape node associated with this shader error.
-
setGeometry
Sets the geometry associated with this shader error.- Parameters:
geometry
- the geometry associated with this shader error.
-
getGeometry
Returns the geometry associated with this shader error.- Returns:
- the geometry associated with this shader error.
-
setShaderAppearance
Sets the shader appearance associated with this shader error.- Parameters:
shaderApp
- the shader appearance associated with this shader error.
-
getShaderAppearance
Returns the shader appearance associated with this shader error.- Returns:
- the shader appearance associated with this shader error.
-
setShaderProgram
Sets the shader program associated with this shader error.- Parameters:
shaderProgram
- the shader program associated with this shader error.
-
getShaderProgram
Returns the shader program associated with this shader error.- Returns:
- the shader program associated with this shader error.
-
setShader
Sets the shader object associated with this shader error.- Parameters:
shader
- the shader object associated with this shader error.
-
getShader
Returns the shader object associated with this shader error.- Returns:
- the shader object associated with this shader error.
-
setShaderAttributeSet
Sets the shader attribute set associated with this shader error.- Parameters:
shaderAttributeSet
- the shader attribute set associated with this shader error.
-
getShaderAttributeSet
Returns the shader attribute set associated with this shader error.- Returns:
- the shader attribute set associated with this shader error.
-
setShaderAttribute
Sets the shader attribute associated with this shader error.- Parameters:
shaderAttribute
- the shader attribute associated with this shader error.
-
getShaderAttribute
Returns the shader attribute associated with this shader error.- Returns:
- the shader attribute associated with this shader error.
-
toString
Returns a short string that describes this shader error. The string is composed of the textual description of the errorCode, a ": ", and the errorMessage field. If the errorMessage is null then the ": " and the errorMessage are omitted.
-