|
Aviatrix3D 2.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TextureRenderable
Extended version of the ComponentRenderable
interface that provides additional handling for textures.
Textures can come in several diffferent forms and this interface provides a
way to map between the holding TextureUnit
class
and the rendering/culling stage with addtional information about the form
of the contained texture without needing to pull apart the TextureUnit
itself.
Working with offscreen buffers such as Pbuffers and Frame Buffer Objects
requires some cooperation between these interfaces and the rendering
pipeline. The pipeline requires rendering the offscreen buffer in a separate
rendering pass to the use(s) of that buffer. The rendering pass parent is
the OffscreenBufferRenderable. The user of that buffer is this interface.
When this interface is about to be rendered, some buffers require an explicit
binding operation to be performed. Which buffer is used is dependent on how
the scene is constructed and how rendering proceeds, so a level of
abstraction is needed to separate the specifics of the buffer and the
usage of it. To do so is the work of the OffscreenBufferDescriptor
.
When a buffer is created, that is registered with the parent renderable.
When a buffer is used, it is fetched from this interface.
Method Summary | |
---|---|
void |
activateTexture(javax.media.opengl.GL gl,
java.lang.Object externalData)
Activate the texture now. |
void |
deactivateTexture(javax.media.opengl.GL gl,
java.lang.Object externalData)
Deactivate the texture now so that it is no longer a valid rendering target. |
OffscreenBufferDescriptor |
getBuffer(javax.media.opengl.GLContext context)
Fetch the underlying source buffer for the offscreen rendering that relates to this particular texture. |
OffscreenCullable |
getOffscreenSource()
Fetch the offscreen texture source that this renderable holds on to. |
boolean |
isOffscreenBuffer()
Check to see if this is an offscreen buffer that is separately rendered rather than using explicit image data. |
boolean |
isOffscreenSource()
Check to see if the contained texture is an offscreen renderable such as OffscreenTexture2D or MRTOffscreenTexture2D that contains a subscene graph to be rendered. |
Methods inherited from interface org.j3d.aviatrix3d.rendering.ComponentRenderable |
---|
postRender, render |
Methods inherited from interface org.j3d.aviatrix3d.rendering.TransparentRenderable |
---|
hasTransparency |
Methods inherited from interface org.j3d.aviatrix3d.rendering.Renderable |
---|
equals |
Methods inherited from interface java.lang.Comparable |
---|
compareTo |
Method Detail |
---|
void activateTexture(javax.media.opengl.GL gl, java.lang.Object externalData)
gl
- The GL context to render withexternalData
- Some implementation-specific external data to
aid in the renderingvoid deactivateTexture(javax.media.opengl.GL gl, java.lang.Object externalData)
gl
- The GL context to render withexternalData
- Some implementation-specific external data to
aid in the renderingboolean isOffscreenSource()
getOffscreenSource()
method will return the contained cullable.
OffscreenCullable getOffscreenSource()
boolean isOffscreenBuffer()
isOffscreenSource()
method is used to determine that.
OffscreenBufferDescriptor getBuffer(javax.media.opengl.GLContext context)
context
- The containing context to find the matching buffer for
|
Aviatrix3D 2.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |