|
Aviatrix3D 2.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.j3d.aviatrix3d.SceneGraphObject org.j3d.aviatrix3d.NodeComponent org.j3d.aviatrix3d.MultipassTextureComponent
OffscreenTexture2D
or MRTOffscreenTexture2D
public class MultipassTextureComponent
A source for texture information that is dynamically generated as required per frame.
Note: This class does nothing in Aviatrix3D 1.0
The texture width and height are dynamically found each time it is requested. If no scene is set, or the scene does not have a ViewEnvironment with a valid viewport set, then the width and height will both return zero.
Field Summary | |
---|---|
protected float[] |
clearColor
Deprecated. The current clear colour |
protected int |
format
Deprecated. The format |
protected int[] |
formats
Deprecated. The listing of formats defined for each level |
protected int |
glBuffers
Deprecated. The collection of GL buffer IDs needed by the rendering |
protected int |
numLevels
Deprecated. The number of levels in this component. |
protected MultipassRenderObserver |
observer
Deprecated. The observer instance to use for update callbacks |
protected ViewportLayer |
viewLayer
Deprecated. The Scene Graph viewLayer |
Fields inherited from class org.j3d.aviatrix3d.NodeComponent |
---|
lastParent, liveCount, parentList |
Fields inherited from class org.j3d.aviatrix3d.SceneGraphObject |
---|
alive, LISTENER_SET_TIMING_ERR_PROP, updateHandler |
Fields inherited from interface org.j3d.aviatrix3d.MultipassTextureSource |
---|
ACCUMULATION_BUFFER, COLOR_BUFFER, DEPTH_BUFFER, STENCIL_BUFFER |
Fields inherited from interface org.j3d.aviatrix3d.TextureSource |
---|
FORMAT_BGR, FORMAT_BGRA, FORMAT_INTENSITY_ALPHA, FORMAT_LUMINANCE_ALPHA, FORMAT_RGB, FORMAT_RGBA, FORMAT_SINGLE_COMPONENT |
Constructor Summary | |
---|---|
MultipassTextureComponent(int width,
int height)
Deprecated. Construct a multipass texture with the buffer set to the colour buffer only and of the specified dimensions. |
Method Summary | |
---|---|
protected void |
checkForCyclicChild(SceneGraphObject parent)
Deprecated. Check to see if this node is the same reference as the passed node that is a parent of this node. |
void |
getClearColor(float[] col)
Deprecated. Set the background colour that this surface should be cleared to before the drawing step. |
int |
getFormat(int level)
Deprecated. Get the format of this image at the given mipmap level. |
int |
getHeight()
Deprecated. Get the height of the texture in pixels. |
int |
getNumLevels()
Deprecated. Get the number of levels for the mipmapping in this source. |
MultipassRenderObserver |
getRenderObserver()
Deprecated. Fetch the observer instance that may be associated with the texture source. |
int |
getUsedBuffers()
Deprecated. Get the list of buffers that are required to be rendered by this source. |
ViewportLayer |
getViewportLayer()
Deprecated. Get the root of the currently rendered scene. |
int |
getWidth()
Deprecated. Get the width of this image. |
boolean |
isRepaintRequired()
Deprecated. Get the current state of the repainting enabled flag. |
void |
setClearColor(float r,
float g,
float b,
float a)
Deprecated. Set the background colour that this surface should be cleared to before the drawing step. |
protected void |
setLive(boolean state)
Deprecated. Notification that this object is live now. |
void |
setNumLevels(int numLevels)
Deprecated. Set the number of levels of mipmap generation that should be rendered. |
void |
setRenderObserver(MultipassRenderObserver obs)
Deprecated. Set the observer instance to be associated with the texture source. |
void |
setRepaintRequired(boolean enable)
Deprecated. Set this texture as requiring a repaint for the next frame. |
protected void |
setUpdateHandler(NodeUpdateHandler handler)
Deprecated. Set the scenegraph update handler for this node. |
void |
setUsedBuffers(int buffers)
Deprecated. Set the list of buffers that this source needs to write to. |
void |
setViewportLayer(ViewportLayer layer)
Deprecated. Set the collection of geometry that should be rendered to this texture. |
Methods inherited from class org.j3d.aviatrix3d.NodeComponent |
---|
addParent, getParents, numParents, removeParent |
Methods inherited from class org.j3d.aviatrix3d.SceneGraphObject |
---|
checkForCyclicParent, dataChanged, getAppUpdateWriteTimingMessage, getBoundsWriteTimingMessage, getDataWriteTimingMessage, getUserData, isLive, setUserData |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int format
protected ViewportLayer viewLayer
protected float[] clearColor
protected int numLevels
protected int[] formats
protected MultipassRenderObserver observer
protected int glBuffers
Constructor Detail |
---|
public MultipassTextureComponent(int width, int height)
width
- The width of the texture to createheight
- The height of the texture to create
java.lang.IllegalArgumentException
- Either the width or height are not
powers of twoMethod Detail |
---|
public MultipassRenderObserver getRenderObserver()
getRenderObserver
in interface MultipassTextureSource
public int getUsedBuffers()
getUsedBuffers
in interface MultipassTextureSource
public void setNumLevels(int numLevels) throws InvalidWriteTimingException, java.lang.IllegalArgumentException
setNumLevels
in interface MultipassTextureSource
numLevels
- The number of levels to render
java.lang.IllegalArgumentException
- The number of levels is more than what
the current size could reduce to
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener data changed callback methodpublic ViewportLayer getViewportLayer()
getViewportLayer
in interface MultipassTextureSource
public int getHeight()
getHeight
in interface OffscreenTextureSource
public boolean isRepaintRequired()
isRepaintRequired
in interface OffscreenTextureSource
public void getClearColor(float[] col)
getClearColor
in interface OffscreenTextureSource
col
- An array of at least length 4 to copy values intopublic int getWidth()
getWidth
in interface TextureSource
public int getNumLevels()
getNumLevels
in interface TextureSource
public int getFormat(int level)
getFormat
in interface TextureSource
level
- The mipmap level to get the format for
protected void checkForCyclicChild(SceneGraphObject parent) throws CyclicSceneGraphStructureException
checkForCyclicChild
in class SceneGraphObject
parent
- The reference to check against this class
CyclicSceneGraphStructureException
- Equal parent and childprotected void setLive(boolean state)
setLive
in class SceneGraphObject
state
- true if this should be marked as live nowprotected void setUpdateHandler(NodeUpdateHandler handler)
setUpdateHandler
in class SceneGraphObject
handler
- The instance to use as a handlerpublic void setViewportLayer(ViewportLayer layer) throws InvalidWriteTimingException, CyclicSceneGraphStructureException
layer
- The new scene instance to use or null
CyclicSceneGraphStructureException
- Equal parent and child
InvalidWriteTimingException
- An attempt was made to write outside
of the data changed callback methodpublic void setRenderObserver(MultipassRenderObserver obs) throws InvalidWriteTimingException
obs
- The new observer instance to use, or null if none
InvalidWriteTimingException
- An attempt was made to write outside
of the data changed callback methodpublic void setRepaintRequired(boolean enable) throws InvalidWriteTimingException
enable
- true to have this repaint the next frame
InvalidWriteTimingException
- An attempt was made to write outside
of the ApplicationUpdateObserver callback methodpublic void setClearColor(float r, float g, float b, float a) throws InvalidWriteTimingException
r
- The red component of the background clear colourg
- The green component of the background clear colourb
- The blue component of the background clear coloura
- The alpha component of the background clear colour
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener callback methodpublic void setUsedBuffers(int buffers) throws InvalidWriteTimingException
buffers
- The list of buffers bitwise OR together
InvalidWriteTimingException
- An attempt was made to write outside
of the NodeUpdateListener callback method
|
Aviatrix3D 2.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |