|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jme.renderer.Renderer
com.jme.system.dummy.DummyRenderer
public final class DummyRenderer
This class makes up a shell renderer with no functionality. It is here to allow the easy creation of renderer-agnostic jME objects (like various RenderState and Spatial) so that they can be used by conversion utilities to read/write jME. It is NOT to be used for rendering as it won't do anything at all.
| Nested Class Summary | |
|---|---|
(package private) class |
DummyRenderer.TextureStateN
|
| Field Summary |
|---|
| Fields inherited from class com.jme.renderer.Renderer |
|---|
backgroundColor, camera, defaultStateList, height, processingQueue, queue, QUEUE_INHERIT, QUEUE_OPAQUE, QUEUE_ORTHO, QUEUE_SKIP, QUEUE_TRANSPARENT, width |
| Constructor Summary | |
|---|---|
DummyRenderer()
|
|
| Method Summary | |
|---|---|
boolean |
checkAndAdd(Spatial s)
Check a given Spatial to see if it should be queued. |
void |
checkCardError()
Check the underlying rendering system (opengl, etc.) for exceptions. |
void |
cleanup()
Perform any necessary cleanup operations such as deleting VBOs, etc. |
void |
clearBuffers()
clearBuffers clears both the depth buffer and the back
buffer. |
void |
clearColorBuffer()
clearBackBuffer clears the back buffer of the renderer. |
void |
clearPolygonOffset()
Removes any previously set offset from the renderer. |
void |
clearStencilBuffer()
clearStencilBuffer clears the stencil buffer of the renderer. |
void |
clearStrictBuffers()
clearBuffers clears both the depth buffer and the back
buffer restricting the clear to the rectangle defined by the width and
height of the renderer. |
void |
clearVBOCache()
Clears all entries from the VBO cache. |
void |
clearZBuffer()
clearZBuffer clears the depth buffer of the renderer. |
BlendState |
createBlendState()
createBlendState retrieves the blend state object for the
proper renderer. |
Camera |
createCamera(int width,
int height)
createCamera retrieves a default camera for this renderer. |
ClipState |
createClipState()
Retrieves the clip state object for the proper renderer. |
ColorMaskState |
createColorMaskState()
Retrieves the color mask state object for the proper renderer. |
CullState |
createCullState()
createCullState retrieves the cull state object for the
proper renderer. |
int |
createDisplayList(Geometry g)
Generate a DisplayList for drawing the given Geometry. |
FogState |
createFogState()
createFogState retrieves the fog state object for the
proper renderer. |
FragmentProgramState |
createFragmentProgramState()
Retrieves the fragment program state object for the proper renderer. |
GLSLShaderObjectsState |
createGLSLShaderObjectsState()
createShaderObjectsState retrieves the shader object state
object for the proper renderer. |
LightState |
createLightState()
createLightState retrieves the light state object for the
proper renderer. |
StateRecord |
createLineRecord()
|
MaterialState |
createMaterialState()
createMaterialState retrieves the material state object
for the proper renderer. |
StateRecord |
createRendererRecord()
|
ShadeState |
createShadeState()
createShadeState retrieves the shade state object for the
proper renderer. |
StencilState |
createStencilState()
Retrieves the stencil state object for the proper renderer. |
StippleState |
createStippleState()
Retrieves the stipple state object for the proper renderer. |
TextureState |
createTextureState()
createTextureState retrieves the texture state object for
the proper renderer. |
VertexProgramState |
createVertexProgramState()
Retrieves the vertex program state object for the proper renderer. |
WireframeState |
createWireframeState()
createWireframeState retrieves the wireframe state object
for the proper renderer. |
ZBufferState |
createZBufferState()
Retrieves the Z buffer state object for the proper renderer. |
void |
deleteVBO(java.nio.Buffer buffer)
Checks the VBO cache to see if this Buffer is mapped to a VBO-id. |
void |
deleteVBO(int vboid)
Attempts to delete the VBO with this VBO id. |
void |
displayBackBuffer()
displayBackBuffer swaps the back buffer with the currently
displayed buffer. |
void |
draw(Curve c)
draw renders a curve to the back buffer. |
void |
draw(Line line)
draw renders a single Line collection to the back buffer. |
void |
draw(Point point)
draw renders a single Point collection to the back buffer. |
void |
draw(QuadMesh qMesh)
draw renders a single QuadMesh to the back buffer. |
void |
draw(Spatial s)
draw renders a scene. |
void |
draw(Text t)
draw renders text to the back buffer. |
void |
draw(TriMesh tMesh)
draw renders a single TriMesh to the back buffer. |
void |
finish()
finish is similar to flush, however it blocks until all
waiting OpenGL commands have been finished. |
void |
flush()
flush tells opengl to send through all currently waiting
commands in the buffer. |
ColorRGBA |
getBackgroundColor()
getBackgroundColor retrieves the clear color of the
current OpenGL context. |
int |
getHeight()
Retrieve the height set on this renderer. |
RenderQueue |
getQueue()
Get the render queue associated with this Renderer. |
int |
getWidth()
Retrieve the width set on this renderer. |
void |
grabScreenContents(java.nio.ByteBuffer buff,
Image.Format format,
int x,
int y,
int w,
int h)
grabScreenContents reads a block of data as bytes from the
current framebuffer. |
boolean |
isHeadless()
See Renderer.isHeadless() |
boolean |
isInOrthoMode()
|
boolean |
isProcessingQueue()
Return true if this renderer is in the middle of processing its RenderQueue. |
void |
reinit(int width,
int height)
Reinitialize the renderer with the given width/height. |
void |
releaseDisplayList(int listId)
Releases a DisplayList from the card. |
java.lang.Integer |
removeFromVBOCache(java.nio.Buffer buffer)
Removes the mapping between this Buffer and it's VBO-id. |
void |
setBackgroundColor(ColorRGBA c)
setBackgroundColor sets the color of window. |
void |
setCamera(Camera camera)
setCamera sets the reference to the applications camera
object. |
void |
setHeadless(boolean headless)
See Renderer.setHeadless() |
void |
setOrtho()
setOrtho sets the display system to be in orthographic
mode. |
void |
setOrthoCenter()
setOrthoCenter sets the display system to be in
orthographic mode. |
void |
setPolygonOffset(float factor,
float offset)
Sets an offset to the zbuffer to be used when comparing an incoming polygon for depth buffer pass/fail. |
boolean |
supportsVBO()
Return true if the system running this supports VBO |
void |
takeScreenShot(java.lang.String filename)
takeScreenShot saves the current buffer to a png file. |
void |
unsetOrtho()
unsetOrhto unsets the display system from orthographic
mode back into regular projection mode. |
void |
updateTextureSubImage(Texture dstTexture,
int dstX,
int dstY,
Image srcImage,
int srcX,
int srcY,
int width,
int height)
Updates a region of the content area of the provided texture using the specified region of the given data. |
| Methods inherited from class com.jme.renderer.Renderer |
|---|
clearQueue, createState, createState, getCamera, renderQueue |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DummyRenderer()
| Method Detail |
|---|
public void setCamera(Camera camera)
RenderersetCamera sets the reference to the applications camera
object.
setCamera in class Renderercamera - the camera object to use with this Renderer.
public Camera createCamera(int width,
int height)
RenderercreateCamera retrieves a default camera for this renderer.
createCamera in class Rendererwidth - the width of the frame.height - the height of the frame.
public BlendState createBlendState()
RenderercreateBlendState retrieves the blend state object for the
proper renderer.
createBlendState in class RendererBlendState object that can make use of the
proper renderer.public void flush()
Rendererflush tells opengl to send through all currently waiting
commands in the buffer.
flush in class Rendererpublic void finish()
Rendererfinish is similar to flush, however it blocks until all
waiting OpenGL commands have been finished.
finish in class Rendererpublic CullState createCullState()
RenderercreateCullState retrieves the cull state object for the
proper renderer.
createCullState in class RendererCullState object that can make use of the
proper renderer.public FogState createFogState()
RenderercreateFogState retrieves the fog state object for the
proper renderer.
createFogState in class RendererFogState object that can make use of the
proper renderer.public LightState createLightState()
RenderercreateLightState retrieves the light state object for the
proper renderer.
createLightState in class RendererLightState object that can make use of the
proper renderer.public MaterialState createMaterialState()
RenderercreateMaterialState retrieves the material state object
for the proper renderer.
createMaterialState in class RendererMaterialState object that can make use of the
proper renderer.public ShadeState createShadeState()
RenderercreateShadeState retrieves the shade state object for the
proper renderer.
createShadeState in class RendererShadeState object that can make use of the
proper renderer.public TextureState createTextureState()
RenderercreateTextureState retrieves the texture state object for
the proper renderer.
createTextureState in class RendererTextureState object that can make use of the
proper renderer.public WireframeState createWireframeState()
RenderercreateWireframeState retrieves the wireframe state object
for the proper renderer.
createWireframeState in class RendererWireframeState object that can make use of the
proper renderer.public ZBufferState createZBufferState()
Renderer
createZBufferState in class RendererZBufferState object that can make use of the
proper renderer.public VertexProgramState createVertexProgramState()
Renderer
createVertexProgramState in class RendererVertexProgramState object that can make use of
the proper renderer.public FragmentProgramState createFragmentProgramState()
Renderer
createFragmentProgramState in class RendererVertexProgramState object that can make use of
the proper renderer.public GLSLShaderObjectsState createGLSLShaderObjectsState()
RenderercreateShaderObjectsState retrieves the shader object state
object for the proper renderer.
createGLSLShaderObjectsState in class RendererShaderObjectsState object that can make use of
the proper renderer.public StencilState createStencilState()
Renderer
createStencilState in class RendererStencilState object that can make use of the
proper renderer.public ClipState createClipState()
Renderer
createClipState in class RendererClipState object that can make use of the
proper renderer.public ColorMaskState createColorMaskState()
Renderer
createColorMaskState in class RendererColorMaskState object that can make use of the
proper renderer.public StippleState createStippleState()
Renderer
createStippleState in class RendererStippleState object that can make use of the
proper renderer.public void setBackgroundColor(ColorRGBA c)
RenderersetBackgroundColor sets the color of window. This color
will be shown for any pixel that is not set via typical rendering
operations.
setBackgroundColor in class Rendererc - the color to set the background to.public ColorRGBA getBackgroundColor()
RenderergetBackgroundColor retrieves the clear color of the
current OpenGL context.
getBackgroundColor in class RendererRenderer.getBackgroundColor()public void clearZBuffer()
RendererclearZBuffer clears the depth buffer of the renderer. The
Z buffer allows sorting of pixels by depth or distance from the view
port. Clearing this buffer prepares it for the next frame.
clearZBuffer in class Rendererpublic void clearColorBuffer()
RendererclearBackBuffer clears the back buffer of the renderer.
The backbuffer is the buffer being rendered to before it is displayed to
the screen. Clearing this buffer frees it for rendering the next frame.
clearColorBuffer in class Rendererpublic void clearStencilBuffer()
RendererclearStencilBuffer clears the stencil buffer of the renderer.
clearStencilBuffer in class Rendererpublic void clearBuffers()
RendererclearBuffers clears both the depth buffer and the back
buffer.
clearBuffers in class Rendererpublic void clearStrictBuffers()
RendererclearBuffers clears both the depth buffer and the back
buffer restricting the clear to the rectangle defined by the width and
height of the renderer.
clearStrictBuffers in class Rendererpublic void displayBackBuffer()
RendererdisplayBackBuffer swaps the back buffer with the currently
displayed buffer. Swapping (page flipping) allows the renderer to display
a prerenderer display without any flickering.
displayBackBuffer in class Rendererpublic void setOrtho()
RenderersetOrtho sets the display system to be in orthographic
mode. If the system has already been set to orthographic mode a
JmeException is thrown. The origin (0,0) is the bottom
left of the screen.
setOrtho in class Rendererpublic void setOrthoCenter()
RenderersetOrthoCenter sets the display system to be in
orthographic mode. If the system has already been set to orthographic
mode a JmeException is thrown. The origin (0,0) is the
center of the screen.
setOrthoCenter in class Rendererpublic void unsetOrtho()
RendererunsetOrhto unsets the display system from orthographic
mode back into regular projection mode. If the system is not in
orthographic mode a JmeException is thrown.
unsetOrtho in class Rendererpublic void takeScreenShot(java.lang.String filename)
RenderertakeScreenShot saves the current buffer to a png file. The
filename is provided, .png will be appended to the end of the name.
takeScreenShot in class Rendererfilename - the name of the screenshot file.
public void grabScreenContents(java.nio.ByteBuffer buff,
Image.Format format,
int x,
int y,
int w,
int h)
RenderergrabScreenContents reads a block of data as bytes from the
current framebuffer. The format determines how many bytes per pixel are
read and thus how big the buffer must be that you pass in.
grabScreenContents in class Rendererbuff - a buffer to store contents in.format - the format to read in bytes for.x - -
x starting point of blocky - -
y starting point of blockw - -
width of blockh - -
height of blockpublic void draw(Spatial s)
Rendererdraw 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.
draw in class Renderers - the scene to render.public void draw(Point point)
Rendererdraw renders a single Point collection to the back buffer.
draw in class Rendererpoint - the points to be rendered.public void draw(Line line)
Rendererdraw renders a single Line collection to the back buffer.
draw in class Rendererline - the line to be rendered.public void draw(Curve c)
Rendererdraw renders a curve to the back buffer.
draw in class Rendererc - the curve to be rendered.public void draw(Text t)
Rendererdraw renders text to the back buffer.
draw in class Renderert - the text object to be rendered.public RenderQueue getQueue()
Renderer
getQueue in class Rendererpublic boolean isProcessingQueue()
Renderer
isProcessingQueue in class Rendererpublic boolean checkAndAdd(Spatial s)
Renderer
checkAndAdd in class Renderers - Spatial to check
public boolean supportsVBO()
Renderer
supportsVBO in class Rendererpublic boolean isHeadless()
Renderer
isHeadless in class Rendererpublic void setHeadless(boolean headless)
Renderer
setHeadless in class Rendererpublic int getWidth()
Renderer
getWidth in class Rendererpublic int getHeight()
Renderer
getHeight in class Renderer
public void reinit(int width,
int height)
Renderer
reinit in class Rendererwidth - intheight - intpublic int createDisplayList(Geometry g)
Renderer
createDisplayList in class Rendererg - the geometry to make a display list for
public void releaseDisplayList(int listId)
Renderer
releaseDisplayList in class RendererlistId - the id of the display list to release
public void setPolygonOffset(float factor,
float offset)
Renderer
setPolygonOffset in class Rendererfactor - Specifies a scale factor that is used to create a variable
depth offset for each polygon. The initial value is 0.offset - Is multiplied by an implementation-specific value to create a
constant depth offset. The initial value is 0.public void clearPolygonOffset()
Renderer
clearPolygonOffset in class Rendererpublic void deleteVBO(java.nio.Buffer buffer)
Renderer
deleteVBO in class Rendererbuffer - The Buffer who's associated VBO should be deleted.public void deleteVBO(int vboid)
Renderer
deleteVBO in class Rendererpublic void clearVBOCache()
Renderer
clearVBOCache in class Rendererpublic java.lang.Integer removeFromVBOCache(java.nio.Buffer buffer)
Renderer
removeFromVBOCache in class Rendererbuffer - The nio Buffer whose associated VBO should be deleted.
public void draw(TriMesh tMesh)
Rendererdraw renders a single TriMesh to the back buffer.
draw in class RenderertMesh - the mesh to be rendered.public void draw(QuadMesh qMesh)
Rendererdraw renders a single QuadMesh to the back buffer.
draw in class RendererqMesh - the mesh to be rendered.public StateRecord createLineRecord()
createLineRecord in class Rendererpublic StateRecord createRendererRecord()
createRendererRecord in class Renderer
public void checkCardError()
throws JmeException
Renderer
checkCardError in class RendererJmeException - if an error is found.public void cleanup()
Renderer
cleanup in class Rendererpublic boolean isInOrthoMode()
isInOrthoMode in class Renderer
public void updateTextureSubImage(Texture dstTexture,
int dstX,
int dstY,
Image srcImage,
int srcX,
int srcY,
int width,
int height)
throws JmeException,
java.lang.UnsupportedOperationException
Renderer
updateTextureSubImage in class RendererdstTexture - the texture to be updateddstX - the x offset relative to the lower-left corner of this texture
where the update will be applieddstY - the y offset relative to the lower-left corner of this texture
where the update will be appliedsrcImage - the image data to be uploaded to the texturesrcX - the x offset relative to the lower-left corner of the supplied
buffer from which to fetch the update rectanglesrcY - the y offset relative to the lower-left corner of the supplied
buffer from which to fetch the update rectanglewidth - the width of the region to be updatedheight - the height of the region to be updated
JmeException - if unable to update the texture
java.lang.UnsupportedOperationException - if updating for the provided texture type is unsupportedcom.sun.opengl.util.texture.Texture#updateSubImage(com.sun.opengl.util.texture.TextureData,
int, int, int, int, int, int, int)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||