|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xith3d.render.RenderOptions
public class RenderOptions
Storage class for configuring renderer options. Efficiency of this class is important to overall rendering time. All set and get opertaions are simple O(1) complexity operations which should not increase rendering time by a tracable margin. Constructors (and loading of default options or cloning RenderOptions using the loadOptions method) are O(n) operations but should only rarely be used. Import/Export methods are added for convenience and have no time constraints.
| Field Summary | |
|---|---|
static boolean |
DEFAULT_VALUE_DISPLAY_LISTS_ENABLED
Whether or not to use display lists for vertex data drawing. |
static boolean |
DEFAULT_VALUE_GL_ERROR_CHECKS_ENABLED
Whether the graphic card should be checked for errors on every call. if there is an error then an exception will be thrown. |
static boolean |
DEFAULT_VALUE_GL_TRACING_ENABLED
Whether or not we should turn on the lowest level of graphics card tracing. |
static boolean |
DEFAULT_VALUE_LIGHTING_ENABLED
The use lights on|off flag. |
static boolean |
DEFAULT_VALUE_TEXTURE_MAPPING_ENABLED
Whether or not to render textures. |
static boolean |
DEFAULT_VALUE_VBOS_ENABLED
Whether or not to use vertex buffer objects to store vertex data on the video card. |
static boolean |
DEFAULT_VALUE_WIREFRAME_MODE_ENABLED
Whether or not to render in only wireframe (GL_LINE) mode. |
| Constructor Summary | |
|---|---|
RenderOptions()
Default constructor uses the default settings for all of the render options. |
|
RenderOptions(RenderOptions base)
Creates a new RenderOptions class which mimmics the given RenderOptions. |
|
| Method Summary | |
|---|---|
boolean |
areDisplayListsEnabled()
|
boolean |
areGLErrorChecksEnabled()
|
boolean |
areVBOsEnabled()
|
java.util.HashMap<java.lang.String,java.lang.Object> |
exportOptions()
Populates a HashMap with the options and their values. |
void |
importOptions(java.util.Map<java.lang.String,java.lang.Object> map)
Sets all options from the given HashMap into the current RenderOptions object. |
boolean |
isGLStatesCacheEnabled()
|
boolean |
isGLTracingEnabled()
|
boolean |
isLightingEnabled()
|
boolean |
isTextureMappingEnabled()
|
boolean |
isWireframeModeEnabled()
|
void |
loadDefaultOptions()
Loads the Xith3D default options. |
void |
loadOptions(RenderOptions renderOptions)
Reads the options from the passed RenderOptions and sets them in this RenderOptions. |
void |
setDisplayListsEnabled(boolean enabled)
Sets whether or not to use display lists for vertex data drawing. |
void |
setGLErrorChecksEnabled(boolean enabled)
Sets whether the graphic card should be checked for errors on every call. if there is an error then an exception will be thrown. |
void |
setGLStatesCacheEnabled(boolean enabled)
Sets the use GL-states-cache on|off flag. |
void |
setGLTracingEnabled(boolean enabled)
Sets whether or not we should turn on the lowest level of graphics card tracing. |
void |
setLightingEnabled(boolean enabled)
Sets the use lights on|off flag. |
void |
setTextureMappingEnabled(boolean enabled)
Sets whether or not to render textures. |
void |
setVBOsEnabled(boolean enabled)
Sets whether or not to use vertex buffer objects to store vertex data on the video card. |
void |
setWireframeModeEnabled(boolean enabled)
Sets whether or not to render in only wireframe (GL_LINE) mode. |
boolean |
switchWireframeMode()
Switches wireframe mode. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final boolean DEFAULT_VALUE_LIGHTING_ENABLED
public static final boolean DEFAULT_VALUE_VBOS_ENABLED
public static final boolean DEFAULT_VALUE_DISPLAY_LISTS_ENABLED
public static final boolean DEFAULT_VALUE_TEXTURE_MAPPING_ENABLED
public static final boolean DEFAULT_VALUE_WIREFRAME_MODE_ENABLED
public static final boolean DEFAULT_VALUE_GL_ERROR_CHECKS_ENABLED
public static final boolean DEFAULT_VALUE_GL_TRACING_ENABLED
| Constructor Detail |
|---|
public RenderOptions()
public RenderOptions(RenderOptions base)
base - The RenderOptions whose options will be cloned. If it is null
then the default options are used.| Method Detail |
|---|
public void setGLStatesCacheEnabled(boolean enabled)
enabled - public final boolean isGLStatesCacheEnabled()
public void setLightingEnabled(boolean enabled)
enabled - public final boolean isLightingEnabled()
public void setVBOsEnabled(boolean enabled)
enabled - public final boolean areVBOsEnabled()
public void setDisplayListsEnabled(boolean enabled)
enabled - public final boolean areDisplayListsEnabled()
public void setTextureMappingEnabled(boolean enabled)
enabled - public final boolean isTextureMappingEnabled()
public void setWireframeModeEnabled(boolean enabled)
enabled - public final boolean isWireframeModeEnabled()
public boolean switchWireframeMode()
public void setGLErrorChecksEnabled(boolean enabled)
enabled - public final boolean areGLErrorChecksEnabled()
public void setGLTracingEnabled(boolean enabled)
enabled - public final boolean isGLTracingEnabled()
public void loadDefaultOptions()
public void loadOptions(RenderOptions renderOptions)
renderOptions - The render options that will be cloned by this
RenderOptionspublic java.util.HashMap<java.lang.String,java.lang.Object> exportOptions()
public void importOptions(java.util.Map<java.lang.String,java.lang.Object> map)
map - The options to import.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||