org.ogre4j
Interface IRenderTarget

All Superinterfaces:
IAllocatedObject<IRenderSysAllocPolicy>, INativeObject, IRenderSysAllocatedObject
All Known Subinterfaces:
IMultiRenderTarget, IRenderTexture, IRenderWindow
All Known Implementing Classes:
MultiRenderTarget, RenderTarget, RenderTexture, RenderWindow

public interface IRenderTarget
extends INativeObject, IRenderSysAllocatedObject


Nested Class Summary
static interface IRenderTarget.IFrameStats
           
static interface IRenderTarget.IImpl
           
static interface IRenderTarget.IRenderTargetListenerList
           
static interface IRenderTarget.IViewportList
           
 
Method Summary
 IRenderTarget.IImpl _getImpl()
          Get rendersystem specific interface for this .
 void _notifyCameraRemoved(ICamera cam)
          Utility method to notify a render target that a camera has been removed, incase it was referring to it as a viewer.
 void addListener(IRenderTargetListener listener)
          Add a listener to this which will be called back before & after rendering.
 IViewport addViewport(ICamera cam, int ZOrder, float left, float top, float width, float height)
          Adds a viewport to the rendering target.
 void copyContentsToMemory(IPixelBox dst, RenderTarget.FrameBuffer buffer)
          Copies the current contents of the render target to a pixelbox.
 float getAverageFPS()
          Individual stats access - gets the average frames per second (FPS) since call to .
 int getBatchCount()
          Gets the number of batches rendered in the last call.
 float getBestFPS()
          Individual stats access - gets the best frames per second (FPS) since call to .
 float getBestFrameTime()
          Individual stats access - gets the best frame time
 long getColourDepth()
           
 void getCustomAttribute(java.lang.String name, VoidPointer pData)
          Gets a custom (maybe platform-specific) attribute.
 long getFSAA()
          Indicates whether multisampling is performed on rendering and at what level.
 long getHeight()
           
 float getLastFPS()
          Individual stats access - gets the number of frames per second (FPS) based on the last frame rendered.
 void getMetrics(LongPointer width, LongPointer height, LongPointer colourDepth)
           
 java.lang.String getName()
           
 int getNumViewports()
          Returns the number of viewports attached to this target.
 short getPriority()
          Gets the priority of a render target.
 IRenderTarget.IFrameStats getStatistics()
           
 void getStatistics(FloatPointer lastFPS, FloatPointer avgFPS, FloatPointer bestFPS, FloatPointer worstFPS)
          Retieves details of current rendering performance.
 int getTriangleCount()
          Gets the number of triangles rendered in the last call.
 IViewport getViewport(int index)
          Retrieves a pointer to the viewport with the given index.
 long getWidth()
           
 float getWorstFPS()
          Individual stats access - gets the worst frames per second (FPS) since call to .
 float getWorstFrameTime()
          Individual stats access - gets the worst frame time
 boolean isActive()
          Used to retrieve or set the active state of the render target.
 boolean isAutoUpdated()
          Gets whether this target is automatically updated if Ogre's rendering loop or is being used.
 boolean isHardwareGammaEnabled()
          Indicates whether on rendering, linear colour space is converted to sRGB gamma colour space.
 boolean isPrimary()
          Indicates whether this target is the primary window.
 void removeAllListeners()
          Removes all listeners from this instance.
 void removeAllViewports()
          Removes all viewports on this target.
 void removeListener(IRenderTargetListener listener)
          Removes a previously registered using addListener.
 void removeViewport(int ZOrder)
          Removes a viewport at a given ZOrder.
 boolean requiresTextureFlipping()
           
 void resetStatistics()
          Resets saved frame-rate statistices.
 void setActive(boolean state)
          Used to set the active state of the render target.
 void setAutoUpdated(boolean autoupdate)
          Sets whether this target should be automatically updated if Ogre's rendering loop or is being used.
 void setPriority(short priority)
          Sets the priority of this render target in relation to the others.
 PixelFormat suggestPixelFormat()
          Suggests a pixel format to use for extracting the data in this target, when calling copyContentsToMemory.
 void swapBuffers(boolean waitForVSync)
          Swaps the frame buffers to display the next frame.
 void update(boolean swapBuffers)
          Tells the target to update it's contents.
 void writeContentsToFile(java.lang.String filename)
          Writes the current contents of the render target to the named file.
 java.lang.String writeContentsToTimestampedFile(java.lang.String filenamePrefix, java.lang.String filenameSuffix)
          Writes the current contents of the render target to the (PREFIX)(time-stamp)(SUFFIX) file.
 
Methods inherited from interface org.xbig.base.INativeObject
delete, disconnectFromNativeObject, getInstancePointer, setInstancePointer, setInstancePointer, setInstancePointer
 

Method Detail

getName

java.lang.String getName()

getMetrics

void getMetrics(LongPointer width,
                LongPointer height,
                LongPointer colourDepth)

getWidth

long getWidth()

getHeight

long getHeight()

getColourDepth

long getColourDepth()

update

void update(boolean swapBuffers)
Tells the target to update it's contents.


swapBuffers

void swapBuffers(boolean waitForVSync)
Swaps the frame buffers to display the next frame.


addViewport

IViewport addViewport(ICamera cam,
                      int ZOrder,
                      float left,
                      float top,
                      float width,
                      float height)
Adds a viewport to the rendering target.


getNumViewports

int getNumViewports()
Returns the number of viewports attached to this target.


getViewport

IViewport getViewport(int index)
Retrieves a pointer to the viewport with the given index.


removeViewport

void removeViewport(int ZOrder)
Removes a viewport at a given ZOrder.


removeAllViewports

void removeAllViewports()
Removes all viewports on this target.


getStatistics

void getStatistics(FloatPointer lastFPS,
                   FloatPointer avgFPS,
                   FloatPointer bestFPS,
                   FloatPointer worstFPS)
Retieves details of current rendering performance.


getStatistics

IRenderTarget.IFrameStats getStatistics()

getLastFPS

float getLastFPS()
Individual stats access - gets the number of frames per second (FPS) based on the last frame rendered.


getAverageFPS

float getAverageFPS()
Individual stats access - gets the average frames per second (FPS) since call to .


getBestFPS

float getBestFPS()
Individual stats access - gets the best frames per second (FPS) since call to .


getWorstFPS

float getWorstFPS()
Individual stats access - gets the worst frames per second (FPS) since call to .


getBestFrameTime

float getBestFrameTime()
Individual stats access - gets the best frame time


getWorstFrameTime

float getWorstFrameTime()
Individual stats access - gets the worst frame time


resetStatistics

void resetStatistics()
Resets saved frame-rate statistices.


getCustomAttribute

void getCustomAttribute(java.lang.String name,
                        VoidPointer pData)
Gets a custom (maybe platform-specific) attribute.


addListener

void addListener(IRenderTargetListener listener)
Add a listener to this which will be called back before & after rendering.


removeListener

void removeListener(IRenderTargetListener listener)
Removes a previously registered using addListener.


removeAllListeners

void removeAllListeners()
Removes all listeners from this instance.


setPriority

void setPriority(short priority)
Sets the priority of this render target in relation to the others.


getPriority

short getPriority()
Gets the priority of a render target.


isActive

boolean isActive()
Used to retrieve or set the active state of the render target.


setActive

void setActive(boolean state)
Used to set the active state of the render target.


setAutoUpdated

void setAutoUpdated(boolean autoupdate)
Sets whether this target should be automatically updated if Ogre's rendering loop or is being used.


isAutoUpdated

boolean isAutoUpdated()
Gets whether this target is automatically updated if Ogre's rendering loop or is being used.


copyContentsToMemory

void copyContentsToMemory(IPixelBox dst,
                          RenderTarget.FrameBuffer buffer)
Copies the current contents of the render target to a pixelbox.


suggestPixelFormat

PixelFormat suggestPixelFormat()
Suggests a pixel format to use for extracting the data in this target, when calling copyContentsToMemory.


writeContentsToFile

void writeContentsToFile(java.lang.String filename)
Writes the current contents of the render target to the named file.


writeContentsToTimestampedFile

java.lang.String writeContentsToTimestampedFile(java.lang.String filenamePrefix,
                                                java.lang.String filenameSuffix)
Writes the current contents of the render target to the (PREFIX)(time-stamp)(SUFFIX) file.


requiresTextureFlipping

boolean requiresTextureFlipping()

getTriangleCount

int getTriangleCount()
Gets the number of triangles rendered in the last call.


getBatchCount

int getBatchCount()
Gets the number of batches rendered in the last call.


_notifyCameraRemoved

void _notifyCameraRemoved(ICamera cam)
Utility method to notify a render target that a camera has been removed, incase it was referring to it as a viewer.


isPrimary

boolean isPrimary()
Indicates whether this target is the primary window. The primary window is special in that it is destroyed when ogre is shut down, and cannot be destroyed directly. This is the case because it holds the context for vertex, index buffers and textures.


isHardwareGammaEnabled

boolean isHardwareGammaEnabled()
Indicates whether on rendering, linear colour space is converted to sRGB gamma colour space. This is the exact opposite conversion of what is indicated by , and can only be enabled on creation of the render target. For render windows, it's enabled through the 'gamma' creation misc parameter. For textures, it is enabled through the hwGamma parameter to the create call.


getFSAA

long getFSAA()
Indicates whether multisampling is performed on rendering and at what level.


_getImpl

IRenderTarget.IImpl _getImpl()
Get rendersystem specific interface for this . This is used by the to (un)bind this target, and to get specific information like surfaces and framebuffer objects.



Copyright © 2007 netAllied GmbH. All Rights Reserved.