diff --git a/src/java/org/lwjgl/opengl/Pbuffer.java b/src/java/org/lwjgl/opengl/Pbuffer.java index bc29d5fe..eb44e5c9 100644 --- a/src/java/org/lwjgl/opengl/Pbuffer.java +++ b/src/java/org/lwjgl/opengl/Pbuffer.java @@ -158,6 +158,24 @@ public final class Pbuffer implements Drawable { Sys.initialize(); } + /** + * Create an instance of a Pbuffer with a unique OpenGL context. The buffer is single-buffered. + *
+ * NOTE: The Pbuffer will have its own context that shares display lists and textures withshared_context
,
+ * or, if shared_context
is null
, 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.
+ *
+ *
+ * @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.
*
@@ -167,7 +185,8 @@ public final class Pbuffer implements Drawable {
*
* 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.
*
*
* @param width Pbuffer width