aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/javax/media/opengl/GLFBODrawable.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-09-20 16:06:56 +0200
committerSven Gothel <[email protected]>2014-09-20 16:59:15 +0200
commite99f5060d62aad25fcc37ebf50c8f2a270c9d5df (patch)
tree0552e86445c856ef2b3e0f83a54637e003a51fa6 /src/jogl/classes/javax/media/opengl/GLFBODrawable.java
parenta6123fe0c71ebe87b2fcef8475cc1fbdd0fe0a36 (diff)
FBObject: Fix depth- and stencil bit count selection for attachRenderbuffer(..);
- Fix depth- and stencil bit count selection for attachRenderbuffer(..) - Add generic values: DEFAULT_BITS, REQUESTED_BITS, CHOSEN_BITS, MAXIMUM_BITS - Refactor depth- and stencil bit-count -> format into own method - Allow depth- and stencil bit-count select a higher bit-count if required (fix) - GLFBODrawable.FBOMODE_USE_DEPTH is deprecated, using GLCapabilities.[get|set]DepthBits(..) - It was an oversight to introduce the bit flag in the first place, since we should have used the capabilities depth bit-count - Graph Test: GLEventListenerButton shall use requested capabilities for FBO drawable.
Diffstat (limited to 'src/jogl/classes/javax/media/opengl/GLFBODrawable.java')
-rw-r--r--src/jogl/classes/javax/media/opengl/GLFBODrawable.java17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/jogl/classes/javax/media/opengl/GLFBODrawable.java b/src/jogl/classes/javax/media/opengl/GLFBODrawable.java
index e98e5cbd5..01db60b2e 100644
--- a/src/jogl/classes/javax/media/opengl/GLFBODrawable.java
+++ b/src/jogl/classes/javax/media/opengl/GLFBODrawable.java
@@ -80,11 +80,14 @@ public interface GLFBODrawable extends GLDrawable {
/** FBO Mode Bit: Use a {@link TextureAttachment} for the {@link #getColorbuffer(int) render colorbuffer} ({@link #FBOMODE_DEFAULT default}), see {@link #setFBOMode(int)}. */
public static final int FBOMODE_USE_TEXTURE = 1 << 0;
- /** FBO Mode Bit: Use a depth renderbuffer ({@link #FBOMODE_DEFAULT default}), see {@link #setFBOMode(int)}. */
+ /**
+ * FBO Mode Bit: Use a depth renderbuffer ({@link #FBOMODE_DEFAULT default}), see {@link #setFBOMode(int)}.
+ * @deprecated Use {@link GLCapabilities#setDepthBits(int)}!
+ */
public static final int FBOMODE_USE_DEPTH = 1 << 1;
- /** FBO Default Mode Bit: {@link #FBOMODE_USE_TEXTURE} | {@link #FBOMODE_USE_DEPTH}. */
- public static final int FBOMODE_DEFAULT = FBOMODE_USE_TEXTURE | FBOMODE_USE_DEPTH;
+ /** FBO Default Mode Bit: {@link #FBOMODE_USE_TEXTURE}. */
+ public static final int FBOMODE_DEFAULT = FBOMODE_USE_TEXTURE;
/**
* @return <code>true</code> if initialized, i.e. a {@link GLContext} is bound and made current once, otherwise <code>false</code>.
@@ -101,8 +104,8 @@ public interface GLFBODrawable extends GLDrawable {
* {@link #FBOMODE_USE_TEXTURE} is always added at initialization.
* </p>
*
- * @param modeBits custom FBO mode bits like {@link #FBOMODE_USE_TEXTURE} and {@link #FBOMODE_USE_DEPTH}.
- * @throws IllegalStateException if the underlying FBO is already {@link #isInitialized()}.
+ * @param modeBits custom FBO mode bits like {@link #FBOMODE_USE_TEXTURE}.
+ * @throws IllegalStateException if already initialized, see {@link #isInitialized()}.
*/
void setFBOMode(final int modeBits) throws IllegalStateException;
@@ -155,9 +158,9 @@ public interface GLFBODrawable extends GLDrawable {
* Must be called before {@link #isInitialized() initialization}, otherwise an exception is thrown.
* </p>
* @return the new number of buffers (FBO) used, maybe different than the requested <code>bufferCount</code> (see above)
- * @throws GLException if already initialized, see {@link #isInitialized()}.
+ * @throws IllegalStateException if already initialized, see {@link #isInitialized()}.
*/
- int setNumBuffers(final int bufferCount) throws GLException;
+ int setNumBuffers(final int bufferCount) throws /* IllegalStateException, */ GLException;
/**
* @return the number of buffers (FBO) being used. 1 if not using {@link GLCapabilities#getDoubleBuffered() double buffering},