summaryrefslogtreecommitdiffstats
path: root/src/net/java/games/jogl/GLCapabilities.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/java/games/jogl/GLCapabilities.java')
-rw-r--r--src/net/java/games/jogl/GLCapabilities.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/net/java/games/jogl/GLCapabilities.java b/src/net/java/games/jogl/GLCapabilities.java
index 389617912..5095c802a 100644
--- a/src/net/java/games/jogl/GLCapabilities.java
+++ b/src/net/java/games/jogl/GLCapabilities.java
@@ -61,6 +61,10 @@ public class GLCapabilities implements Cloneable {
// Shift bits from PIXELFORMATDESCRIPTOR not present because they
// are unlikely to be supported on Windows anyway
+ // Support for full-scene antialiasing (FSAA)
+ private boolean sampleBuffers = false;
+ private int numSamples = 2;
+
// Bits for pbuffer creation
private boolean offscreenFloatingPointBuffers;
private boolean offscreenRenderToTexture;
@@ -245,6 +249,32 @@ public class GLCapabilities implements Cloneable {
this.accumAlphaBits = accumAlphaBits;
}
+ /** Indicates whether sample buffers for full-scene antialiasing
+ (FSAA) should be allocated for this drawable. Defaults to
+ false. */
+ public void setSampleBuffers(boolean onOrOff) {
+ sampleBuffers = onOrOff;
+ }
+
+ /** Returns whether sample buffers for full-scene antialiasing
+ (FSAA) should be allocated for this drawable. Defaults to
+ false. */
+ public boolean getSampleBuffers() {
+ return sampleBuffers;
+ }
+
+ /** If sample buffers are enabled, indicates the number of buffers
+ to be allocated. Defaults to 2. */
+ public void setNumSamples(int numSamples) {
+ this.numSamples = numSamples;
+ }
+
+ /** Returns the number of sample buffers to be allocated if sample
+ buffers are enabled. Defaults to 2. */
+ public int getNumSamples() {
+ return numSamples;
+ }
+
/** For offscreen surfaces only (pbuffers), indicates whether
floating-point buffers should be used if available. Defaults to
false. */