|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | ||||||||
java.lang.Objectjava.lang.Enum<RenderEngine>
com.partnersoft.preferences.model.RenderEngine
public enum RenderEngine
The RenderEngine is the main driver used for map rendering.
Switching between rendering engines completely changes the methods used to draw maps. Minor changes in appearance and behavior may be observed between different engines, and choice of engine and underlying settings can have a profound effect on performance for some machines.
Generally, you should use OpenGL mode and animation on desktop or vehicle-powered computers, and Java2D and no animation on battery-powered computers. If there are problems (flickering, crashing) with OpenGL, drivers should be updated, and if that doesn't fix the problem, Java2D should be used instead as a safe default.
Copyright 2010 Partner Software, Inc.
| Enum Constant Summary | |
|---|---|
JAVA2D
Java2D is the "safe" engine. |
|
OPENGL
OpenGL is the high performance engine. |
|
| Method Summary | |
|---|---|
static RenderEngine |
forName(java.lang.String name)
|
java.lang.String |
getName()
|
static RenderEngine |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static RenderEngine[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
| Methods inherited from class java.lang.Enum |
|---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final RenderEngine JAVA2D
It uses Java2D, the standard graphics API for Java, for rendering, and is generally less hardware dependent than OpenGL. Java2D is also the graphics engine used for all reports, plotting, or image exports. so if you want the view to look as close as possible to printed versions then this is the engine to use.
Java2D may also be easier on battery life for battery-powered computers. While it is more CPU-intensive for a full refresh, it uses double-buffering and other tricks to avoid full refreshes. If you turn off animation, it should only refresh when the map view is changed by panning and zooming.
On the other hand, Java2D, since it is almost entirely software-driven, is typically slower than OpenGL, especially when the machine has a modern 3D-capable graphics card. Also, there are 3D-dependent effects (perspective view) that are disabled in Java2D mode.
public static final RenderEngine OPENGL
OpenGL is a hardware-accelerated 3D graphics API. It is widely supported on modern video cards. On most machines OpenGL will outperform the Java2D engine and use less main CPU.
Also, OpenGL mode enables full 3D map viewing, including perspective mode for e.g. LiDAR or elevation data.
Since it is hardware-accelerated, OpenGL mode is more prone to hardware and driver issues - flickering, artifacts, or even crashing on some hardware. Generally updating video drivers fixes most problems but Java2D is specifically intended to be a safe engine for computers that have problem with OpenGL mode.
Also, OpenGL mode requires full-screen refreshes and tends to require more rendering, especially if animation is enabled. This may hurt battery life for battery-powered computers.
| Method Detail |
|---|
public static RenderEngine[] values()
for (RenderEngine c : RenderEngine.values()) System.out.println(c);
public static RenderEngine valueOf(java.lang.String name)
name - the name of the enum constant to be returned.
java.lang.IllegalArgumentException - if this enum type has no constant
with the specified name
java.lang.NullPointerException - if the argument is nullpublic static RenderEngine forName(java.lang.String name)
public java.lang.String getName()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | ||||||||