com.partnersoft.preferences.model
Class OpenglPreferences

java.lang.Object
  extended by com.partnersoft.preferences.model.AbstractSubsystemPreferences
      extended by com.partnersoft.preferences.model.OpenglPreferences
All Implemented Interfaces:
Coggable, SubsystemPreferences

public class OpenglPreferences
extends AbstractSubsystemPreferences

Preferences for OpenGL rendering engine.

If renderQuality is set to CUSTOM, then the other switches apply; otherwise they do not.

The custom behavior switches are extremely detailed and designed to match exactly to real OpenGL features. So, they are pretty technical.

Copyright 2010 Partner Software, Inc.

Version:
$Id$
Author:
Paul Reavis

Constructor Summary
OpenglPreferences()
           
OpenglPreferences(Cog state)
           
 
Method Summary
 boolean getAntialiasFonts()
          If true, fonts are anti-aliased.
 TextureFiltering getFontTextureFiltering()
          Specifies texture filtering used for map text objects.
 boolean getFontTextureMipmapping()
          If true, map text font textures are mipmapped (additional scales generated).
 TextureFiltering getImageTextureFiltering()
          Specifies texture filtering used for map image objects.
 boolean getImageTextureMipmapping()
          If true, map image object textures are mipmapped (additional scales generated).
 RenderingHint getLineSmoothingHint()
          This is the quality hint given to the the line smoothing algorithm.
 TextureFiltering getPointTextureFiltering()
          Specifies texture filtering used for map point object icons.
 boolean getPointTextureMipmapping()
          If true, map point icon textures are mipmapped (additional scales generated).
 RenderingHint getPolygonSmoothingHint()
          This is the quality hint given to the the polygon smoothing algorithm.
 RenderQuality getRenderQuality()
          Render quality preset to use.
 int getSampleBufferCount()
          This is the number of sample buffers used for full-screen anti-aliasing (FSAA).
 boolean getUseFractionalMetrics()
          If true, fractional metrics are used to render fonts.
 boolean getUseHeavyweightCanvas()
          If true, uses a heavyweight (non-Swing) canvas for drawing.
 boolean isLineSmoothing()
          If true, line smoothing is enabled.
 boolean isPolygonSmoothing()
          If true, polygon smoothing is enabled.
 void setAntialiasFonts(boolean antialiasFonts)
           
 void setFontTextureFiltering(TextureFiltering fontTextureFiltering)
           
 void setFontTextureMipmapping(boolean fontTextureMipmapping)
           
 void setImageTextureFiltering(TextureFiltering imageTextureFiltering)
           
 void setImageTextureMipmapping(boolean imageTextureMipmapping)
           
 void setLineSmoothing(boolean lineSmoothing)
           
 void setLineSmoothingHint(RenderingHint lineSmoothingHint)
           
 void setPointTextureFiltering(TextureFiltering pointTextureFiltering)
           
 void setPointTextureMipmapping(boolean pointTextureMipmapping)
           
 void setPolygonSmoothing(boolean polygonSmoothing)
           
 void setPolygonSmoothingHint(RenderingHint polygonSmoothingHint)
           
 void setRenderQuality(RenderQuality renderQuality)
           
 void setSampleBufferCount(int sampleBufferCount)
           
 void setUseFractionalMetrics(boolean useFractionalMetrics)
           
 void setUseHeavyweightCanvas(boolean useHeavyweightCanvas)
           
 Cog toCog()
          Returns the complete internal state of this object in the form of a Cog.
 
Methods inherited from class com.partnersoft.preferences.model.AbstractSubsystemPreferences
getName, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenglPreferences

public OpenglPreferences()

OpenglPreferences

public OpenglPreferences(Cog state)
Method Detail

toCog

public Cog toCog()
Description copied from interface: Coggable
Returns the complete internal state of this object in the form of a Cog.

Specified by:
toCog in interface Coggable
Overrides:
toCog in class AbstractSubsystemPreferences
Returns:
Cog representing the internal state of this object

getRenderQuality

public RenderQuality getRenderQuality()
Render quality preset to use. If CUSTOM is specified, the other values in this object are used as custom configuration; otherwise the appropriate presets are used and the other values in this object are ignored.


setRenderQuality

public void setRenderQuality(RenderQuality renderQuality)

getUseHeavyweightCanvas

public boolean getUseHeavyweightCanvas()
If true, uses a heavyweight (non-Swing) canvas for drawing. Generally this is faster, however heavyweight panels cannot have lightweight controls drawn atop them. This causes problems with menus (which we've worked around) and with floating error displays (which we have not).


setUseHeavyweightCanvas

public void setUseHeavyweightCanvas(boolean useHeavyweightCanvas)

getSampleBufferCount

public int getSampleBufferCount()
This is the number of sample buffers used for full-screen anti-aliasing (FSAA). Zero means no FSAA is used. Generally more buffers means higher quality and slower speed but your mileage may vary.


setSampleBufferCount

public void setSampleBufferCount(int sampleBufferCount)

getAntialiasFonts

public boolean getAntialiasFonts()
If true, fonts are anti-aliased. In OpenGL, fonts are generated into textures, so this is a similar anti-alias mechanism (if not the same) used in Java2D. The resulting textures are then scaled and rendered like any other texture, so other settings like filtering may affect font appearance. Since fonts are only rendered once to textures, the performance cost of antialiasing should be minimal (unlike Java2D, where this happens every time text is drawn).


setAntialiasFonts

public void setAntialiasFonts(boolean antialiasFonts)

getUseFractionalMetrics

public boolean getUseFractionalMetrics()
If true, fractional metrics are used to render fonts. In OpenGL, fonts are generated into textures, so this is a similar mechanism (if not the same) used in Java2D. The resulting textures are then scaled, rotated, and rendered like any other texture, so other settings like filtering may affect font appearance. Since fonts are only rendered once to textures, the performance cost of fractional metrics should be minimal (unlike Java2D, where this happens every time text is drawn).


setUseFractionalMetrics

public void setUseFractionalMetrics(boolean useFractionalMetrics)

isLineSmoothing

public boolean isLineSmoothing()
If true, line smoothing is enabled. This is a form of anti-aliasing. The actual appearance and performance are highly hardware- and driver-dependent.


setLineSmoothing

public void setLineSmoothing(boolean lineSmoothing)

getLineSmoothingHint

public RenderingHint getLineSmoothingHint()
This is the quality hint given to the the line smoothing algorithm.


setLineSmoothingHint

public void setLineSmoothingHint(RenderingHint lineSmoothingHint)

isPolygonSmoothing

public boolean isPolygonSmoothing()
If true, polygon smoothing is enabled. This is a form of anti-aliasing. The actual appearance and performance are highly hardware- and driver-dependent.


setPolygonSmoothing

public void setPolygonSmoothing(boolean polygonSmoothing)

getPolygonSmoothingHint

public RenderingHint getPolygonSmoothingHint()
This is the quality hint given to the the polygon smoothing algorithm.


setPolygonSmoothingHint

public void setPolygonSmoothingHint(RenderingHint polygonSmoothingHint)

getPointTextureFiltering

public TextureFiltering getPointTextureFiltering()
Specifies texture filtering used for map point object icons.


setPointTextureFiltering

public void setPointTextureFiltering(TextureFiltering pointTextureFiltering)

getImageTextureFiltering

public TextureFiltering getImageTextureFiltering()
Specifies texture filtering used for map image objects.


setImageTextureFiltering

public void setImageTextureFiltering(TextureFiltering imageTextureFiltering)

getFontTextureFiltering

public TextureFiltering getFontTextureFiltering()
Specifies texture filtering used for map text objects.


setFontTextureFiltering

public void setFontTextureFiltering(TextureFiltering fontTextureFiltering)

getPointTextureMipmapping

public boolean getPointTextureMipmapping()
If true, map point icon textures are mipmapped (additional scales generated). This may improve performance. It may use more memory or slow rendering down. It may do both or neither.


setPointTextureMipmapping

public void setPointTextureMipmapping(boolean pointTextureMipmapping)

getImageTextureMipmapping

public boolean getImageTextureMipmapping()
If true, map image object textures are mipmapped (additional scales generated). This may improve performance. It may use more memory or slow rendering down. It may do both or neither.


setImageTextureMipmapping

public void setImageTextureMipmapping(boolean imageTextureMipmapping)

getFontTextureMipmapping

public boolean getFontTextureMipmapping()
If true, map text font textures are mipmapped (additional scales generated). This may improve performance. It may use more memory or slow rendering down. It may do both or neither.


setFontTextureMipmapping

public void setFontTextureMipmapping(boolean fontTextureMipmapping)