|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
TextureRenderer defines an interface that handles rendering a
scene to a buffer and copying it to a texture. Creation of this object is
typically handled via a call to a DisplaySystem subclass.
Example Usage:
NOTE: This example uses the DisplaySystem class to obtain the
TextureRenderer.
DisplaySystem.getDisplaySystem().createTextureRenderer(...)
DisplaySystem| Field Summary | |
static int |
RENDER_TEXTURE_1D
defines a constant for usage of a one dimensional texture. |
static int |
RENDER_TEXTURE_2D
defines a constant for usage of a two dimensional texture. |
static int |
RENDER_TEXTURE_CUBE_MAP
defines a constant for usage of a cubic texture. |
static int |
RENDER_TEXTURE_RECTANGLE
defines a constant for usage of a rectangular texture. |
| Method Summary | |
void |
cleanup()
Any wrapping up and cleaning up of TextureRenderer information is performed here. |
ColorRGBA |
getBackgroundColor()
getBackgroundColor retrieves the color used for the window
background. |
Camera |
getCamera()
getCamera retrieves the camera this renderer is using. |
void |
render(Spatial spat,
Texture tex)
render renders a scene. |
void |
setBackgroundColor(ColorRGBA c)
setBackgroundColor sets the color of window. |
void |
setCamera(Camera camera)
setCamera sets the camera this renderer should use. |
Texture |
setupTexture()
setupTexture generates a new Texture object for use with
TextureRenderer. |
Texture |
setupTexture(int glTextureID)
setupTexture retrieves the color used for the window
background. |
void |
updateCamera()
updateCamera updates the camera in the pbuffer context. |
| Field Detail |
public static final int RENDER_TEXTURE_1D
public static final int RENDER_TEXTURE_2D
public static final int RENDER_TEXTURE_RECTANGLE
public static final int RENDER_TEXTURE_CUBE_MAP
| Method Detail |
public Camera getCamera()
getCamera retrieves the camera this renderer is using.
public void setCamera(Camera camera)
setCamera sets the camera this renderer should use.
camera - the camera this renderer should use.public void updateCamera()
updateCamera updates the camera in the pbuffer context.
public void render(Spatial spat,
Texture tex)
render renders a scene. As it recieves a base class of
Spatial the renderer hands off management of the scene to
spatial for it to determine when a Geometry leaf is
reached. All of this is done in the context of the underlying texture
buffer.
spat - the scene to render.tex - the Texture to render it to.public void setBackgroundColor(ColorRGBA c)
setBackgroundColor sets the color of window. This color
will be shown for any pixel that is not set via typical rendering
operations.
c - the color to set the background to.public ColorRGBA getBackgroundColor()
getBackgroundColor retrieves the color used for the window
background.
public Texture setupTexture()
setupTexture generates a new Texture object for use with
TextureRenderer. Generates a valid gl texture id for this texture.
public Texture setupTexture(int glTextureID)
setupTexture retrieves the color used for the window
background.
glTextureID - a valid gl texture id to use
public void cleanup()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||