diff options
author | Kenneth Russel <[email protected]> | 2004-04-13 23:55:04 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2004-04-13 23:55:04 +0000 |
commit | ef6a1983a48dd2c3f52987777862c3583ca24c57 (patch) | |
tree | b49fed675a1b3ee74d39747cce928b5e83bc0229 /src/net/java/games/jogl/GLCapabilities.java | |
parent | dc4d980ec184d2372b5bde0384ff17cda845c0b5 (diff) |
Initial support for multisample / full-scene antialiasing (FSAA);
currently on Windows, X11 and other ports to follow
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@108 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/net/java/games/jogl/GLCapabilities.java')
-rw-r--r-- | src/net/java/games/jogl/GLCapabilities.java | 30 |
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. */ |