|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jme.renderer.lwjgl.LWJGLPbufferTextureRenderer
public class LWJGLPbufferTextureRenderer
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 | |
---|---|
LWJGLPbufferTextureRenderer(int width,
int height,
LWJGLDisplaySystem display,
LWJGLRenderer parentRenderer,
TextureRenderer.Target target)
|
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 pbuffer 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> spats,
java.util.ArrayList<Texture> texs)
render renders a scene. |
void |
render(java.util.ArrayList<? extends Spatial> spats,
java.util.ArrayList<Texture> texs,
boolean doClear)
render renders a scene. |
void |
render(Spatial spat,
Texture tex)
render renders a scene. |
void |
render(Spatial spat,
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 force)
Set up this textureRenderer for use with multiple targets. |
void |
setupTexture(Texture2D tex)
setupTexture initializes a new Texture object for use with
TextureRenderer. |
void |
setupTexture(Texture2D tex,
int width,
int height)
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 LWJGLPbufferTextureRenderer(int width, int height, LWJGLDisplaySystem display, LWJGLRenderer parentRenderer, TextureRenderer.Target target)
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 TextureRenderer
public Camera getCamera()
getCamera
retrieves the camera this renderer is using.
getCamera
in interface TextureRenderer
public void setCamera(Camera camera)
setCamera
sets the camera this renderer should use.
setCamera
in interface TextureRenderer
camera
- the camera this renderer should use.public void setBackgroundColor(ColorRGBA c)
setBackgroundColor
sets the OpenGL clear color to the
color specified.
setBackgroundColor
in interface TextureRenderer
c
- 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 TextureRenderer
Renderer.getBackgroundColor()
public void setupTexture(Texture2D tex)
setupTexture
initializes a new Texture object for use with
TextureRenderer. Generates a valid gl texture id for this texture and
inits the data type for the texture.
setupTexture
in interface TextureRenderer
tex
- The texture to setup for use in Texture Rendering.public void setupTexture(Texture2D tex, int width, int height)
setupTexture
initializes a new Texture object for use with
TextureRenderer. Generates a valid gl texture id for this texture and
inits the data type for the texture.
public void render(Spatial spat, Texture tex)
TextureRenderer
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.
NOTE: If more than one texture is given, copy-texture is used
regardless of card capabilities to decrease render time.
render
in interface TextureRenderer
spat
- the scene to render.tex
- the Texture to render it to.public void render(Spatial spat, 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.
NOTE: If more than one texture is given, copy-texture is used
regardless of card capabilities to decrease render time.
render
in interface TextureRenderer
spat
- the scene to render.tex
- the Texture(s) to render it to.public void render(java.util.ArrayList<? extends Spatial> spats, java.util.ArrayList<Texture> texs)
TextureRenderer
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
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 TextureRenderer
spats
- an array of Spatials to render.texs
- the Texture to render it to.public void render(java.util.ArrayList<? extends Spatial> spats, java.util.ArrayList<Texture> texs, boolean doClear)
TextureRenderer
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
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 TextureRenderer
spats
- 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 pbuffer contents to
the given Texture. What is copied is up to the Texture object's rttSource
field.
copyToTexture
in interface TextureRenderer
tex
- The Texture to copy into.width
- the width of the texture imageheight
- the height of the texture imagepublic void cleanup()
TextureRenderer
cleanup
in interface TextureRenderer
public int getWidth()
getWidth
in interface TextureRenderer
public int getHeight()
getHeight
in interface TextureRenderer
public void setMultipleTargets(boolean force)
TextureRenderer
setMultipleTargets
in interface TextureRenderer
force
- 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 |