|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xith3d.render.CanvasPeer
public abstract class CanvasPeer
All CanvasPeer implementations must extend this class.
It offers the base methods of all implementations.
| Field Summary | |
|---|---|
protected boolean |
isGammaChanged
|
protected OpenGLInfo |
oglInfo
|
| Constructor Summary | |
|---|---|
CanvasPeer(DisplayMode displayMode,
DisplayMode.FullscreenMode fullscreen,
boolean vsync,
FSAA fsaa,
int depthBufferSize)
|
|
| Method Summary | |
|---|---|
protected void |
addDestroyableObject(SceneGraphOpenGLReference ref)
|
void |
addTriangles(long num)
|
protected void |
addWindowClosingListener(WindowClosingListener l)
Adds a new WindowClosingListener to be notified, when a non-fullscreen Canvas3D's Window is to be closed by clicking the X-button. |
abstract void |
beforeThreadChanged()
This method should be executed by the Thread that starts the actual rendering Thread right before it starts it. |
abstract void |
clear()
Clears the screen to BLACK. |
protected abstract RenderPeer |
createRenderPeer()
|
void |
destroy()
Clears the screen (BLACK) and destroys the display. |
protected void |
destroyGLNames(boolean onlyGCed)
|
protected void |
fireClosingEvent()
|
int |
getBPP()
|
float |
getBrightness()
|
Canvas3D |
getCanvas3D()
|
int |
getCanvasID()
|
abstract java.lang.Object |
getComponent()
|
float |
getContrast()
|
org.jagatoo.input.render.Cursor |
getCursor()
|
int |
getDepthBufferSize()
|
DisplayMode |
getDisplayMode()
|
protected abstract java.lang.Class<?> |
getExpectedNativeDisplayModeClass()
|
int |
getFrequency()
|
FSAA |
getFSAA()
|
protected java.lang.Boolean |
getFullscreenSwitchRequest()
|
float |
getGamma()
|
abstract int |
getHeight()
Gets the width in an implementation independant manner |
org.jagatoo.input.devices.InputDeviceFactory |
getInputDeviceFactory()
|
abstract int |
getLeft()
Gets the left-location in an implementation independant manner |
int |
getMaxTextureSize()
|
int |
getMaxTextureUnits()
|
int |
getMaxVertexAttributes()
|
abstract org.openmali.types.twodee.Rect2i |
getMaxViewport()
|
OpenGLCapabilities |
getOpenGLCapabilities()
|
OpenGLInfo |
getOpenGLInfo()
|
abstract long |
getRenderedFrames()
|
java.lang.Object |
getRenderLock()
|
RenderPeer |
getRenderPeer()
|
abstract java.lang.String |
getTitle()
Gets the title in an implementation independant manner |
abstract int |
getTop()
Gets the top-location in an implementation independant manner |
long |
getTriangles()
|
abstract OpenGLLayer |
getType()
|
org.openmali.types.twodee.Rect2i |
getViewport()
|
abstract int |
getWidth()
Gets the width in an implementation independant manner |
abstract java.lang.Object |
getWindow()
|
protected abstract java.lang.Object |
initRenderingImpl(View view,
java.util.List<RenderPass> renderPasses,
boolean layeredMode,
long frameId,
long nanoTime,
long nanoStep,
PickRequest pickRequest)
Initializes the rendering. |
protected boolean |
isClosingListenerRegistered()
|
boolean |
isDestroyed()
|
boolean |
isFullscreen()
|
abstract boolean |
isRendering()
This flag is set by the Rendering system triggered by xith or by the CanvasPeer implementation itself (e.g when the CanvasPeer is auto-redrawn). |
boolean |
isUndecorated()
|
boolean |
isVSyncEnabled()
|
protected void |
removeWindowClosingListener(WindowClosingListener l)
Removes a WindowClosingListener. |
protected void |
resetFullscreenSwitchRequest()
|
protected void |
setCanvas3D(Canvas3D canvas)
|
void |
setCursor(org.jagatoo.input.render.Cursor cursor)
Sets the new Cursor for this Mouse. |
protected void |
setCursorImpl(org.jagatoo.input.render.Cursor cursor)
This method is called when a NEW Cursor is applied to this Mouse. |
protected void |
setDepthBufferSize(int size)
|
boolean |
setDisplayMode(DisplayMode displayMode)
Sets the new DisplayMode in an implementation independant manner |
protected abstract boolean |
setDisplayModeImpl(DisplayMode displayMode)
Sets the new DisplayMode in an implementation independant manner. |
protected void |
setDisplayModeRef(DisplayMode displayMode)
|
boolean |
setFullscreen(boolean fullscreen)
Switches this Canvas3D's fullscreen flag. |
void |
setGamma(float gamma,
float brightness,
float contrast)
Changes the gamma-, brightness- and contrast values for this CanvasPeer. |
abstract void |
setIcon(java.net.URL iconResource)
Changes the window icon. |
abstract boolean |
setLocation(int x,
int y)
Sets the location in an implementation independant manner. |
protected void |
setOpenGLCapabilities(OpenGLCapabilities caps)
|
abstract boolean |
setSize(int width,
int height)
Sets the size in an implementation independant manner. |
abstract void |
setTitle(java.lang.String title)
Sets the title in an implementation independant manner. |
void |
setTriangles(long num)
|
void |
setViewport(org.openmali.types.twodee.Rect2i viewport)
Sets this CanvasPeer's Viewport. |
void |
setVSyncEnabled(boolean vsync)
Enables or disables V-Sync. |
java.io.File |
takeScreenshot(boolean alpha)
Takes a screenshot of the current rendering of the first added Canvas3D. |
void |
takeScreenshot(java.io.File file,
boolean alpha)
Takes a screenshot of the current rendering |
java.io.File |
takeScreenshot(java.lang.String filenameBase,
boolean alpha)
Takes a screenshot of the current rendering |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.jagatoo.input.render.InputSourceWindow |
|---|
getDrawable, getInputDeviceFactory, receivesInputEvents, refreshCursor |
| Field Detail |
|---|
protected OpenGLInfo oglInfo
protected boolean isGammaChanged
| Constructor Detail |
|---|
public CanvasPeer(DisplayMode displayMode,
DisplayMode.FullscreenMode fullscreen,
boolean vsync,
FSAA fsaa,
int depthBufferSize)
| Method Detail |
|---|
protected abstract RenderPeer createRenderPeer()
public RenderPeer getRenderPeer()
protected void setCanvas3D(Canvas3D canvas)
public Canvas3D getCanvas3D()
public abstract OpenGLLayer getType()
OpenGLLayerpublic final int getCanvasID()
public final OpenGLInfo getOpenGLInfo()
public final java.lang.Object getRenderLock()
protected final java.lang.Boolean getFullscreenSwitchRequest()
protected final void resetFullscreenSwitchRequest()
public boolean setFullscreen(boolean fullscreen)
fullscreen -
public final boolean isFullscreen()
public final boolean isUndecorated()
protected abstract java.lang.Class<?> getExpectedNativeDisplayModeClass()
protected abstract boolean setDisplayModeImpl(DisplayMode displayMode)
displayMode - protected final void setDisplayModeRef(DisplayMode displayMode)
public final boolean setDisplayMode(DisplayMode displayMode)
public final DisplayMode getDisplayMode()
public final int getBPP()
public final int getFrequency()
public void setVSyncEnabled(boolean vsync)
public final boolean isVSyncEnabled()
public final FSAA getFSAA()
protected void setDepthBufferSize(int size)
public final int getDepthBufferSize()
protected final boolean isClosingListenerRegistered()
protected void addWindowClosingListener(WindowClosingListener l)
l - protected void removeWindowClosingListener(WindowClosingListener l)
l - protected void fireClosingEvent()
protected final void setOpenGLCapabilities(OpenGLCapabilities caps)
public final OpenGLCapabilities getOpenGLCapabilities()
public final int getMaxTextureSize()
public final int getMaxTextureUnits()
public final int getMaxVertexAttributes()
public final void setTriangles(long num)
public final void addTriangles(long num)
public final long getTriangles()
public abstract long getRenderedFrames()
public abstract java.lang.Object getWindow()
public abstract java.lang.Object getComponent()
public abstract void setIcon(java.net.URL iconResource)
throws java.io.IOException
iconResource - the resource of the image for the new icon
java.io.IOExceptionprotected void setCursorImpl(org.jagatoo.input.render.Cursor cursor)
Cursor is applied to this Mouse.
cursor - public final void setCursor(org.jagatoo.input.render.Cursor cursor)
null for an invisible Cursor.
Use Cursor.DEFAULT_CURSOR for the system's default Cursor.
setCursor in interface org.jagatoo.input.render.InputSourceWindowcursor - public final org.jagatoo.input.render.Cursor getCursor()
getCursor in interface org.jagatoo.input.render.InputSourceWindowpublic abstract void setTitle(java.lang.String title)
title - public abstract java.lang.String getTitle()
public final org.jagatoo.input.devices.InputDeviceFactory getInputDeviceFactory()
public abstract boolean setLocation(int x,
int y)
x - y - public abstract int getLeft()
public abstract int getTop()
public abstract boolean setSize(int width,
int height)
width - height - public abstract int getWidth()
getWidth in interface org.jagatoo.input.render.InputSourceWindowpublic abstract int getHeight()
getHeight in interface org.jagatoo.input.render.InputSourceWindowpublic abstract org.openmali.types.twodee.Rect2i getMaxViewport()
public void setViewport(org.openmali.types.twodee.Rect2i viewport)
viewport - public org.openmali.types.twodee.Rect2i getViewport()
public void setGamma(float gamma,
float brightness,
float contrast)
gamma - the gamma valuebrightness - the brightness value [-1.0, +1.0]contrast - the contrast value [0, +1.0]public float getGamma()
public float getBrightness()
public float getContrast()
public abstract boolean isRendering()
public abstract void beforeThreadChanged()
protected abstract java.lang.Object initRenderingImpl(View view,
java.util.List<RenderPass> renderPasses,
boolean layeredMode,
long frameId,
long nanoTime,
long nanoStep,
PickRequest pickRequest)
view - the View used to renderrenderPasses - the List of RenderPasses to iterate and renderlayeredMode - if true, the RenderPasses are handled in layered modeframeId - the current frame's idpickRequest - null for normal renderingpublic abstract void clear()
public final boolean isDestroyed()
protected void addDestroyableObject(SceneGraphOpenGLReference ref)
protected final void destroyGLNames(boolean onlyGCed)
public void destroy()
public void takeScreenshot(java.io.File file,
boolean alpha)
file - the file to save the screenshot toalpha - with alpha channel?
public final java.io.File takeScreenshot(java.lang.String filenameBase,
boolean alpha)
filenameBase - the filenameBase to save the screenshot to (e.g. "screens/shot")
The current date and ".png" are appended.alpha - with alpha channel?
public final java.io.File takeScreenshot(boolean alpha)
alpha - with alpha channel?
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||