|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jme.system.DisplaySystem
com.jme.system.dummy.DummyDisplaySystem
public class DummyDisplaySystem
Started Date: Jul 2, 2004
| Field Summary |
|---|
| Fields inherited from class com.jme.system.DisplaySystem |
|---|
alphaBits, bpp, brightness, contrast, created, depthBits, frq, fs, gamma, height, samples, stencilBits, width |
| Constructor Summary | |
|---|---|
DummyDisplaySystem()
|
|
| Method Summary | |
|---|---|
void |
close()
close shutdowns and destroys any window contexts. |
JMECanvas |
createCanvas(int w,
int h)
createCanvas should create a canvas object with the
desired settings. |
JMECanvas |
createCanvas(int w,
int h,
java.lang.String type,
java.util.HashMap<java.lang.String,java.lang.Object> props)
createCanvas should create a canvas object with the desired
settings. |
void |
createHeadlessWindow(int w,
int h,
int bpp)
createHeadlessWindow creates a headless window with the
desired settings. |
TextureRenderer |
createTextureRenderer(int width,
int height,
TextureRenderer.Target target)
Create a TextureRenderer using the underlying system. |
void |
createWindow(int w,
int h,
int bpp,
int frq,
boolean fs)
createWindow creates a window with the desired settings. |
java.lang.String |
getAdapter()
getAdapter returns the name of the underlying system's
graphics adapter for debugging / display purposes. |
RenderContext<java.lang.Object> |
getCurrentContext()
|
java.lang.String |
getDisplayAPIVersion()
getDisplayAPIVersion returns the API version supported |
java.lang.String |
getDisplayRenderer()
getDisplayRenderer returns details of the adapter |
java.lang.String |
getDisplayVendor()
getDisplayVendor returns the vendor of the graphics adapter |
java.lang.String |
getDriverVersion()
getDriverVersion returns a string representing the version
of driver installed on the underlying system. |
DummyRenderer |
getRenderer()
getRenderer returns the Renderer
implementation that is compatible with the chosen
DisplaySystem. |
Vector3f |
getScreenCoordinates(Vector3f worldPosition,
Vector3f store)
Translate world to screen coordinates |
Vector3f |
getWorldCoordinates(Vector2f screenPosition,
float zPos,
Vector3f store)
Translate screen to world coordinates. |
boolean |
isActive()
isActive returns true if the display is active. |
boolean |
isClosing()
isClosing notifies if the window is currently closing. |
boolean |
isValidDisplayMode(int width,
int height,
int bpp,
int freq)
isValidDisplayMode determines if the given parameters
constitute a valid display mode on this system. |
void |
moveWindowTo(int locX,
int locY)
If running in windowed mode, move the window's position to the given display coordinates. |
void |
recreateWindow(int w,
int h,
int bpp,
int frq,
boolean fs)
recreateWindow recreates a window with the desired
settings. |
void |
reset()
reset cleans up the display system for closing or
restarting. |
void |
setIcon(Image[] iconImages)
Sets one or more icons for the DisplaySystem. |
void |
setRenderer(Renderer r)
setRenderer sets the Renderer object that
is to be used by this display. |
void |
setTitle(java.lang.String title)
Sets the title of the display system. |
void |
setVSyncEnabled(boolean enabled)
setVSyncEnabled attempts to enable or disable monitor
vertical synchronization. |
protected void |
updateDisplayBGC()
Update the display's gamma, brightness and contrast based on the set values. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DummyDisplaySystem()
| Method Detail |
|---|
public boolean isValidDisplayMode(int width,
int height,
int bpp,
int freq)
DisplaySystemisValidDisplayMode determines if the given parameters
constitute a valid display mode on this system. Returning true does not
necessarily guarantee that the system is capable of running in the
specified display mode, merely that it believes it is possible.
isValidDisplayMode in class DisplaySystemwidth - the width/horizontal resolution of the display.height - the height/vertical resolution of the display.bpp - the bit depth of the display.freq - the frequency of refresh of the display (in Hz).public void setIcon(Image[] iconImages)
DisplaySystemAs a reference for usual platforms on number of icons and their sizes:
Images should be in format RGBA8888. If they are not jME will try to convert them
using ImageUtils. If that fails a JmeException could be thrown.
setIcon in class DisplaySystemiconImages - Array of Images to be used as icons.public void setVSyncEnabled(boolean enabled)
DisplaySystemsetVSyncEnabled attempts to enable or disable monitor
vertical synchronization. The method is a "best attempt" to change the
monitor vertical refresh synchronization, and is not guaranteed
to be successful. This is dependent on OS.
setVSyncEnabled in class DisplaySystemenabled - true to synchronize, false to
ignore synchronizationpublic void setTitle(java.lang.String title)
DisplaySystem
setTitle in class DisplaySystemtitle - The new display title.
public void createWindow(int w,
int h,
int bpp,
int frq,
boolean fs)
DisplaySystemcreateWindow creates a window with the desired settings.
The width and height defined by w and h define the size of the window if
fullscreen is false, otherwise it defines the resolution of the
fullscreen display. The color depth is defined by bpp. The implementing
class should only allow 16, 24, and 32. The monitor frequency is defined
by the frq parameter and should not exceed the capabilities of the
connected hardware, the implementing class should attempt to assure this
does not happen. Lastly, the boolean flag fs determines if the display
should be windowed or fullscreen. If false, windowed is chosen. This
window will be placed in the center of the screen initially. If true
fullscreen mode will be entered with the appropriate settings.
createWindow in class DisplaySystemw - the width/horizontal resolution of the display.h - the height/vertical resolution of the display.bpp - the color depth of the display.frq - the frequency of refresh of the display.fs - flag determining if fullscreen is to be used or not. True will
use fullscreen, false will use windowed mode.
public void createHeadlessWindow(int w,
int h,
int bpp)
DisplaySystemcreateHeadlessWindow creates a headless window with the
desired settings. A headless window is a rendering target that is not
shown on screen. It is useful for doing offline rendering, integration
and so forth. You can not have a regular and headless window at the same
time. The width and height defined by w and h define the size of the
window. The color depth is defined by bpp.
createHeadlessWindow in class DisplaySystemw - the width/horizontal resolution of the display.h - the height/vertical resolution of the display.bpp - the color depth of the display.
public void recreateWindow(int w,
int h,
int bpp,
int frq,
boolean fs)
DisplaySystemrecreateWindow recreates a window with the desired
settings.
recreateWindow in class DisplaySystemw - the width/horizontal resolution of the display.h - the height/vertical resolution of the display.bpp - the color depth of the display.frq - the frequency of refresh of the display.fs - flag determining if fullscreen is to be used or not. True will
use fullscreen, false will use windowed mode.public DummyRenderer getRenderer()
DisplaySystemgetRenderer returns the Renderer
implementation that is compatible with the chosen
DisplaySystem. For example, if
LWJGLDisplaySystem is used, the returned
Renderer will be LWJGLRenderer.
getRenderer in class DisplaySystemRenderer implementation that is
compatible with the used DisplaySystem.Rendererpublic boolean isClosing()
DisplaySystemisClosing notifies if the window is currently closing.
This could be caused via the application itself or external interrupts
such as alt-f4 etc.
isClosing in class DisplaySystempublic boolean isActive()
DisplaySystemisActive returns true if the display is active.
isActive in class DisplaySystempublic void reset()
DisplaySystemreset cleans up the display system for closing or
restarting.
reset in class DisplaySystempublic void close()
DisplaySystemclose shutdowns and destroys any window contexts.
close in class DisplaySystem
public Vector3f getScreenCoordinates(Vector3f worldPosition,
Vector3f store)
DisplaySystem
getScreenCoordinates in class DisplaySystemworldPosition - Vector3f representing the world position to retrieve.store - Vector3f to store the world position in.
public Vector3f getWorldCoordinates(Vector2f screenPosition,
float zPos,
Vector3f store)
DisplaySystem
getWorldCoordinates in class DisplaySystemscreenPosition - Vector2f representing the screen position with 0,0 at the
bottom leftzPos - float The z position away from the viewing plane.store - Vector3f The vector to store the result in.
public void setRenderer(Renderer r)
DisplaySystemsetRenderer sets the Renderer object that
is to be used by this display. The implementing class should take
measures to insure that the given Renderer is compatible with the
Display.
setRenderer in class DisplaySystemr - the Renderer to set for this display.
public JMECanvas createCanvas(int w,
int h)
DisplaySystemcreateCanvas should create a canvas object with the
desired settings. The width and height defined by w and h define the size
of the canvas. Makes an AWT canvas by default.
createCanvas in class DisplaySystemw - the width/horizontal resolution of the display.h - the height/vertical resolution of the display.
public JMECanvas createCanvas(int w,
int h,
java.lang.String type,
java.util.HashMap<java.lang.String,java.lang.Object> props)
DisplaySystemcreateCanvas should create a canvas object with the desired
settings. The width and height defined by w and h define the size of the
canvas.
createCanvas in class DisplaySystemw - the width/horizontal resolution of the display.h - the height/vertical resolution of the display.type - the type of canvas to make. e.g. "AWT", "SWT".props - the properties we want to use (if any) for constructing our
canvas.
public TextureRenderer createTextureRenderer(int width,
int height,
TextureRenderer.Target target)
DisplaySystem
createTextureRenderer in class DisplaySystemwidth - width of textureheight - height of texture
protected void updateDisplayBGC()
DisplaySystem
updateDisplayBGC in class DisplaySystempublic java.lang.String getAdapter()
DisplaySystemgetAdapter returns the name of the underlying system's
graphics adapter for debugging / display purposes.
getAdapter in class DisplaySystempublic java.lang.String getDisplayVendor()
getDisplayVendor returns the vendor of the graphics adapter
getDisplayVendor in class DisplaySystempublic java.lang.String getDisplayRenderer()
getDisplayRenderer returns details of the adapter
getDisplayRenderer in class DisplaySystempublic java.lang.String getDisplayAPIVersion()
getDisplayAPIVersion returns the API version supported
getDisplayAPIVersion in class DisplaySystempublic java.lang.String getDriverVersion()
DisplaySystemgetDriverVersion returns a string representing the version
of driver installed on the underlying system.
getDriverVersion in class DisplaySystempublic RenderContext<java.lang.Object> getCurrentContext()
getCurrentContext in class DisplaySystem
public void moveWindowTo(int locX,
int locY)
DisplaySystem
moveWindowTo in class DisplaySystem
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||