|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xbig.base.NativeObject
org.ogre4j.RenderWindow
public class RenderWindow
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.ogre4j.IRenderTarget |
|---|
IRenderTarget.IFrameStats, IRenderTarget.IImpl, IRenderTarget.IRenderTargetListenerList, IRenderTarget.IViewportList |
| Field Summary |
|---|
| Fields inherited from class org.xbig.base.NativeObject |
|---|
deleted, object, remote |
| Constructor Summary | |
|---|---|
|
RenderWindow(InstancePointer p)
This constructor is public for internal useage only! |
protected |
RenderWindow(InstancePointer p,
boolean remote)
Creates a Java wrapper object for an existing C++ object. |
|
RenderWindow(WithoutNativeObject val)
Allows creation of Java objects without C++ objects. |
| 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. |
void |
create(java.lang.String name,
long width,
long height,
boolean fullScreen,
INameValuePairList miscParams)
Creates & displays the new window. |
void |
delete()
Deletes the corresponding C++ object. |
void |
destroy()
Destroys the window. |
void |
finalize()
|
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)
|
void |
getMetrics(LongPointer width,
LongPointer height,
LongPointer colourDepth,
IntegerPointer left,
IntegerPointer top)
Overloaded version of getMetrics from , including extra details specific to windowing systems. |
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()
Overridden from , flags invisible windows as inactive |
boolean |
isAutoUpdated()
Gets whether this target is automatically updated if Ogre's rendering loop or is being used. |
boolean |
isClosed()
Indicates whether the window has been closed by the user. |
boolean |
isDeactivatedOnFocusChange()
Returns true if the window will automatically de-activate itself when it loses focus. |
boolean |
isFullScreen()
Returns true if window is running in fullscreen mode. |
boolean |
isHardwareGammaEnabled()
Indicates whether on rendering, linear colour space is converted to sRGB gamma colour space. |
boolean |
isPrimary()
Indicates whether the window is the primary window. |
boolean |
isVisible()
Indicates whether the window is visible (not minimized or obscured) |
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. |
void |
reposition(int left,
int top)
Reposition the window. |
boolean |
requiresTextureFlipping()
|
void |
resetStatistics()
Resets saved frame-rate statistices. |
void |
resize(long width,
long height)
Alter the size of the window. |
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 |
setDeactivateOnFocusChange(boolean deactivate)
Indicates whether the window will automatically deactivate itself when it loses focus. |
void |
setFullscreen(boolean fullScreen,
long width,
long height)
Alter fullscreen mode options. |
void |
setPriority(short priority)
Sets the priority of this render target in relation to the others. |
void |
setVisible(boolean visible)
Set the visibility state |
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 |
windowMovedOrResized()
Notify that the window has been resized |
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 class org.xbig.base.NativeObject |
|---|
disconnectFromNativeObject, equals, getInstancePointer, hashCode, setInstancePointer, setInstancePointer, setInstancePointer, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.xbig.base.INativeObject |
|---|
disconnectFromNativeObject, getInstancePointer, setInstancePointer, setInstancePointer, setInstancePointer |
| Constructor Detail |
|---|
public RenderWindow(InstancePointer p)
protected RenderWindow(InstancePointer p,
boolean remote)
public RenderWindow(WithoutNativeObject val)
WithoutNativeObject,
INativeObject.disconnectFromNativeObject()| Method Detail |
|---|
public void delete()
INativeObjectSubclasses must implement this but if the native instance was created by the underlying library the native call to dispose must not happen!
delete in interface INativeObjectdelete in class NativeObject#remotepublic void finalize()
finalize in class NativeObject
public void create(java.lang.String name,
long width,
long height,
boolean fullScreen,
INameValuePairList miscParams)
create in interface IRenderWindow
public void setFullscreen(boolean fullScreen,
long width,
long height)
setFullscreen in interface IRenderWindowpublic void destroy()
destroy in interface IRenderWindow
public void resize(long width,
long height)
resize in interface IRenderWindowpublic void windowMovedOrResized()
windowMovedOrResized in interface IRenderWindow
public void reposition(int left,
int top)
reposition in interface IRenderWindowpublic boolean isVisible()
isVisible in interface IRenderWindowpublic void setVisible(boolean visible)
setVisible in interface IRenderWindowpublic boolean isActive()
isActive in interface IRenderTargetisActive in interface IRenderWindowpublic boolean isClosed()
isClosed in interface IRenderWindowpublic boolean isPrimary()
isPrimary in interface IRenderTargetisPrimary in interface IRenderWindowpublic boolean isFullScreen()
isFullScreen in interface IRenderWindow
public void getMetrics(LongPointer width,
LongPointer height,
LongPointer colourDepth,
IntegerPointer left,
IntegerPointer top)
getMetrics in interface IRenderWindowpublic PixelFormat suggestPixelFormat()
IRenderTarget
suggestPixelFormat in interface IRenderTargetsuggestPixelFormat in interface IRenderWindowpublic boolean isDeactivatedOnFocusChange()
isDeactivatedOnFocusChange in interface IRenderWindowpublic void setDeactivateOnFocusChange(boolean deactivate)
setDeactivateOnFocusChange in interface IRenderWindowpublic java.lang.String getName()
getName in interface IRenderTarget
public void getMetrics(LongPointer width,
LongPointer height,
LongPointer colourDepth)
getMetrics in interface IRenderTargetpublic long getWidth()
getWidth in interface IRenderTargetpublic long getHeight()
getHeight in interface IRenderTargetpublic long getColourDepth()
getColourDepth in interface IRenderTargetpublic void update(boolean swapBuffers)
update in interface IRenderTargetpublic void swapBuffers(boolean waitForVSync)
swapBuffers in interface IRenderTarget
public IViewport addViewport(ICamera cam,
int ZOrder,
float left,
float top,
float width,
float height)
addViewport in interface IRenderTargetpublic int getNumViewports()
getNumViewports in interface IRenderTargetpublic IViewport getViewport(int index)
getViewport in interface IRenderTargetpublic void removeViewport(int ZOrder)
removeViewport in interface IRenderTargetpublic void removeAllViewports()
removeAllViewports in interface IRenderTarget
public void getStatistics(FloatPointer lastFPS,
FloatPointer avgFPS,
FloatPointer bestFPS,
FloatPointer worstFPS)
getStatistics in interface IRenderTargetpublic IRenderTarget.IFrameStats getStatistics()
getStatistics in interface IRenderTargetpublic float getLastFPS()
getLastFPS in interface IRenderTargetpublic float getAverageFPS()
getAverageFPS in interface IRenderTargetpublic float getBestFPS()
getBestFPS in interface IRenderTargetpublic float getWorstFPS()
getWorstFPS in interface IRenderTargetpublic float getBestFrameTime()
getBestFrameTime in interface IRenderTargetpublic float getWorstFrameTime()
getWorstFrameTime in interface IRenderTargetpublic void resetStatistics()
resetStatistics in interface IRenderTarget
public void getCustomAttribute(java.lang.String name,
VoidPointer pData)
getCustomAttribute in interface IRenderTargetpublic void addListener(IRenderTargetListener listener)
addListener in interface IRenderTargetpublic void removeListener(IRenderTargetListener listener)
removeListener in interface IRenderTargetpublic void removeAllListeners()
removeAllListeners in interface IRenderTargetpublic void setPriority(short priority)
setPriority in interface IRenderTargetpublic short getPriority()
getPriority in interface IRenderTargetpublic void setActive(boolean state)
setActive in interface IRenderTargetpublic void setAutoUpdated(boolean autoupdate)
setAutoUpdated in interface IRenderTargetpublic boolean isAutoUpdated()
isAutoUpdated in interface IRenderTarget
public void copyContentsToMemory(IPixelBox dst,
RenderTarget.FrameBuffer buffer)
copyContentsToMemory in interface IRenderTargetpublic void writeContentsToFile(java.lang.String filename)
writeContentsToFile in interface IRenderTarget
public java.lang.String writeContentsToTimestampedFile(java.lang.String filenamePrefix,
java.lang.String filenameSuffix)
writeContentsToTimestampedFile in interface IRenderTargetpublic boolean requiresTextureFlipping()
requiresTextureFlipping in interface IRenderTargetpublic int getTriangleCount()
getTriangleCount in interface IRenderTargetpublic int getBatchCount()
getBatchCount in interface IRenderTargetpublic void _notifyCameraRemoved(ICamera cam)
_notifyCameraRemoved in interface IRenderTargetpublic boolean isHardwareGammaEnabled()
isHardwareGammaEnabled in interface IRenderTargetpublic long getFSAA()
getFSAA in interface IRenderTargetpublic IRenderTarget.IImpl _getImpl()
_getImpl in interface IRenderTarget
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||