aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/javax/media/opengl/GLFBODrawable.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-12-15 23:25:12 +0100
committerSven Gothel <[email protected]>2012-12-15 23:25:12 +0100
commite7064ece049705e013d80985eae698ce0ee3c4e3 (patch)
treed6b7c347f6835f6ead6a0fb2fe1089451db09ed9 /src/jogl/classes/javax/media/opengl/GLFBODrawable.java
parent36a6cfb5b346f3b0cda7326f61bf22fb60486fd2 (diff)
Cleanup GLContext special entries: getOffscreenContextPixelDataType(), getOffscreenContextReadBuffer(), .. ; Add GLFBODrawable API entries for multi buffering (no impl. yet); GLJPanel 1st simplification using offscreen drawable
- Cleanup GLContext special entries: getOffscreenContextPixelDataType(), getOffscreenContextReadBuffer(), .. ; - add: getDefaultReadBuffer() (-> exposed via GLBase as well) - add: isGLOrientationFlippedVertical() - add: getDefaultPixelDataType() - removed impl: getOffscreenContextPixelDataType() - removed impl: getOffscreenContextReadBuffer() - removed impl: offscreenImageNeedsVerticalFlip() - Add GLFBODrawable API entries for multi buffering (no impl. yet); - TODO: Add implementation code in GLFBODrawableImpl - GLJPanel 1st simplification using FBO - Use above new GL/GLContext entries - Fix: getNativeSurface() and getHandle() - TODO: - Remove distinction of 'pbuffer' and 'software', - Use GLDrawableFactory.createOffscreenDrawable(..) - Use GL for FBO swapping
Diffstat (limited to 'src/jogl/classes/javax/media/opengl/GLFBODrawable.java')
-rw-r--r--src/jogl/classes/javax/media/opengl/GLFBODrawable.java22
1 files changed, 21 insertions, 1 deletions
diff --git a/src/jogl/classes/javax/media/opengl/GLFBODrawable.java b/src/jogl/classes/javax/media/opengl/GLFBODrawable.java
index 079d9af5c..4d6c7c20e 100644
--- a/src/jogl/classes/javax/media/opengl/GLFBODrawable.java
+++ b/src/jogl/classes/javax/media/opengl/GLFBODrawable.java
@@ -101,7 +101,8 @@ public interface GLFBODrawable extends GLDrawable {
void setTextureUnit(int unit);
/**
- * Set a new sample size
+ * Set the number of sample buffers if using MSAA
+ *
* @param gl GL context object bound to this drawable, will be made current during operation.
* A prev. current context will be make current after operation.
* @param newSamples new sample size
@@ -113,6 +114,25 @@ public interface GLFBODrawable extends GLDrawable {
* @return the number of sample buffers if using MSAA, otherwise 0
*/
int getNumSamples();
+
+ /**
+ * Sets the number of buffers (FBO) being used if using {@link GLCapabilities#getDoubleBuffered() double buffering}.
+ * <p>
+ * If {@link GLCapabilities#getDoubleBuffered() double buffering} is not chosen, this is a NOP.
+ * </p>
+ * <p>
+ * 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()}.
+ */
+ int setNumBuffers(int bufferCount) throws GLException;
+
+ /**
+ * @return the number of buffers (FBO) being used. 1 if not using {@link GLCapabilities#getDoubleBuffered() double buffering},
+ * otherwise &ge; 2, depending on {@link #setNumBuffers(int)}.
+ */
+ int getNumBuffers();
/**
* @return the used {@link DoubleBufferMode}