|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jme.renderer.lwjgl.LWJGLTextureRenderer
public class LWJGLTextureRenderer
This class is used by LWJGL to render textures. Users should not create this class directly. Instead, allow DisplaySystem to create it for you.
DisplaySystem.createTextureRenderer(int, int, com.jme.renderer.TextureRenderer.Target)| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.jme.renderer.TextureRenderer |
|---|
TextureRenderer.Target |
| Constructor Summary | |
|---|---|
LWJGLTextureRenderer(int width,
int height,
LWJGLDisplaySystem display,
LWJGLRenderer parentRenderer)
|
|
| Method Summary | |
|---|---|
void |
cleanup()
Any wrapping up and cleaning up of TextureRenderer information is performed here. |
void |
copyToTexture(Texture tex,
int width,
int height)
copyToTexture copies the FBO contents to the given
Texture. |
ColorRGBA |
getBackgroundColor()
getBackgroundColor retrieves the clear color of the
current OpenGL context. |
Camera |
getCamera()
getCamera retrieves the camera this renderer is using. |
int |
getHeight()
|
int |
getWidth()
|
boolean |
isSupported()
isSupported obtains the capability of the graphics card. |
void |
render(java.util.ArrayList<? extends Spatial> toDraw,
java.util.ArrayList<Texture> texs)
render renders a scene. |
void |
render(java.util.ArrayList<? extends Spatial> toDraw,
java.util.ArrayList<Texture> texs,
boolean doClear)
render renders a scene. |
void |
render(Spatial toDraw,
Texture tex)
render renders a scene. |
void |
render(Spatial toDraw,
Texture tex,
boolean doClear)
render renders a scene. |
void |
setBackgroundColor(ColorRGBA c)
setBackgroundColor sets the OpenGL clear color to the
color specified. |
void |
setCamera(Camera camera)
setCamera sets the camera this renderer should use. |
void |
setMultipleTargets(boolean multi)
Set up this textureRenderer for use with multiple targets. |
void |
setupTexture(Texture2D tex)
setupTexture initializes a new Texture object for use with
TextureRenderer. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LWJGLTextureRenderer(int width,
int height,
LWJGLDisplaySystem display,
LWJGLRenderer parentRenderer)
| Method Detail |
|---|
public boolean isSupported()
isSupported obtains the capability of the graphics card.
If the graphics card does not have pbuffer support, false is returned,
otherwise, true is returned. TextureRenderer will not process any scene
elements if pbuffer is not supported.
isSupported in interface TextureRendererpublic Camera getCamera()
getCamera retrieves the camera this renderer is using.
getCamera in interface TextureRendererpublic void setCamera(Camera camera)
setCamera sets the camera this renderer should use.
setCamera in interface TextureRenderercamera - the camera this renderer should use.public void setBackgroundColor(ColorRGBA c)
setBackgroundColor sets the OpenGL clear color to the
color specified.
setBackgroundColor in interface TextureRendererc - the color to set the background color to.TextureRenderer.setBackgroundColor(com.jme.renderer.ColorRGBA)public ColorRGBA getBackgroundColor()
getBackgroundColor retrieves the clear color of the
current OpenGL context.
getBackgroundColor in interface TextureRendererRenderer.getBackgroundColor()public void setupTexture(Texture2D tex)
setupTexture initializes a new Texture object for use with
TextureRenderer. Generates a valid OpenGL texture id for this texture and
initializes the data type for the texture.
setupTexture in interface TextureRenderertex - The texture to setup for use in Texture Rendering.
public void render(Spatial toDraw,
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. The result of the rendering is then copied into the given
texture(s). What is copied is based on the Texture object's rttSource
field.
render in interface TextureRenderertoDraw - the scene to render.tex - the Texture(s) to render it to.
public void render(Spatial toDraw,
Texture tex,
boolean doClear)
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. The result of the rendering is then copied into the given
texture(s). What is copied is based on the Texture object's rttSource
field.
render in interface TextureRenderertoDraw - the scene to render.tex - the Texture(s) to render it to.
public void render(java.util.ArrayList<? extends Spatial> toDraw,
java.util.ArrayList<Texture> texs)
TextureRendererrender 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. The result of the rendering is then copied into the given
textures. What is copied is based on the Texture object's rttSource field.
NOTE: If more than one texture is given, copy-texture is used
regardless of card capabilities to decrease render time.
render in interface TextureRenderertoDraw - an array of Spatials to render.texs - the Texture to render it to.
public void render(java.util.ArrayList<? extends Spatial> toDraw,
java.util.ArrayList<Texture> texs,
boolean doClear)
TextureRendererrender 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. The result of the rendering is then copied into the given
textures. What is copied is based on the Texture object's rttSource field.
NOTE: If more than one texture is given, copy-texture is used
regardless of card capabilities to decrease render time.
render in interface TextureRenderertoDraw - an array of Spatials to render.texs - the Texture to render it to.
public void copyToTexture(Texture tex,
int width,
int height)
copyToTexture copies the FBO contents to the given
Texture. What is copied is up to the Texture object's rttSource field.
copyToTexture in interface TextureRenderertex - The Texture to copy into.width - the width of the texture imageheight - the height of the texture imagepublic void cleanup()
TextureRenderer
cleanup in interface TextureRendererpublic int getWidth()
getWidth in interface TextureRendererpublic int getHeight()
getHeight in interface TextureRendererpublic void setMultipleTargets(boolean multi)
TextureRenderer
setMultipleTargets in interface TextureRenderermulti - true if you plan to use this texture renderer to render
different content to more than one texture.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||