diff --git a/src/java/org/lwjgl/opengl/Pbuffer.java b/src/java/org/lwjgl/opengl/Pbuffer.java index 75a56542..f2228298 100644 --- a/src/java/org/lwjgl/opengl/Pbuffer.java +++ b/src/java/org/lwjgl/opengl/Pbuffer.java @@ -217,11 +217,11 @@ public final class Pbuffer extends DrawableGL { this.width = width; this.height = height; this.peer_info = createPbuffer(width, height, pixel_format, renderTexture); - Context shared_context; + Context shared_context = null; + if ( shared_drawable == null ) + shared_drawable = Display.getDrawable(); // May be null if (shared_drawable != null) shared_context = ((DrawableLWJGL)shared_drawable).getContext(); - else - shared_context = ((DrawableLWJGL)Display.getDrawable()).getContext(); // May be null this.context = new ContextGL(peer_info, attribs, (ContextGL)shared_context); } diff --git a/src/java/org/lwjgl/opengl/PixelFormat.java b/src/java/org/lwjgl/opengl/PixelFormat.java index 02f14f73..10559f30 100644 --- a/src/java/org/lwjgl/opengl/PixelFormat.java +++ b/src/java/org/lwjgl/opengl/PixelFormat.java @@ -38,7 +38,7 @@ package org.lwjgl.opengl; *
* Instants of this class are immutable. An example of the expected way to set * the PixelFormat property values is the following: - *PixelFormat pf = new PixelFormat().withDepth(24).withSamples(4).withSRGB(true);
+ * PixelFormat pf = new PixelFormat().withDepthBits(24).withSamples(4).withSRGB(true);
*
* WARNING: Some pixel formats are known to cause troubles on certain buggy drivers.
* Example: Under Windows, specifying samples != 0 will enable the ARB
@@ -47,7 +47,6 @@ package org.lwjgl.opengl;
* @author elias_naur@sourceforge.net
* @version $Revision$
*/
-
public final class PixelFormat implements PixelFormatLWJGL {
/**