Revision: 2745
http://svn.sourceforge.net/java-game-lib/?rev=2745&view=rev
Author: elias_naur
Date: 2007-02-24 10:41:41 -0800 (Sat, 24 Feb 2007)
Log Message:
-----------
Added a Pbuffer constructor that omits the RenderTexture parameter, and added a note that FBOs should be used instead, if available. Render-to-texture pbuffers can only be available on Windows platforms and is thus not portable.
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/Pbuffer.java
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/Pbuffer.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/Pbuffer.java 2007-02-23 10:14:18 UTC (rev 2744)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/Pbuffer.java 2007-02-24 18:41:41 UTC (rev 2745)
@@ -165,9 +165,28 @@
* or, if <code>shared_context</code> is <code>null</code>, the Display context if it is created. The Pbuffer
* will have its own OpenGL state. Therefore, state changes to a pbuffer will not be seen in the window context and vice versa.
* <p/>
+ *
+ * @param width Pbuffer width
+ * @param height Pbuffer height
+ * @param pixel_format Minimum Pbuffer context properties
+ * @param shared_drawable If non-null the Pbuffer will share display lists and textures with it. Otherwise, the Pbuffer will share
+ * with the Display context (if created).
+ */
+ public Pbuffer(int width, int height, PixelFormat pixel_format, Drawable shared_drawable) throws LWJGLException {
+ this(width, height, pixel_format, null, shared_drawable);
+ }
+
+ /**
+ * Create an instance of a Pbuffer with a unique OpenGL context. The buffer is single-buffered.
+ * <p/>
+ * NOTE: The Pbuffer will have its own context that shares display lists and textures with <code>shared_context</code>,
+ * or, if <code>shared_context</code> is <code>null</code>, the Display context if it is created. The Pbuffer
+ * will have its own OpenGL state. Therefore, state changes to a pbuffer will not be seen in the window context and vice versa.
+ * <p/>
* The renderTexture parameter defines the necessary state for enabling render-to-texture. When this parameter is null,
* render-to-texture is not available. Before using render-to-texture, the Pbuffer capabilities must be queried to ensure that
- * it is supported.
+ * it is supported. Currently only windows platform can support this feature, so it is recommended that EXT_framebuffer_object
+ * or similar is used if available, for maximum portability.
* <p/>
*
* @param width Pbuffer width
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|