Fixed Pbuffer init when Display has not been created.
This commit is contained in:
parent
87c04cc995
commit
12b92fb46d
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ package org.lwjgl.opengl;
|
|||
* <p/>
|
||||
* Instants of this class are immutable. An example of the expected way to set
|
||||
* the PixelFormat property values is the following:
|
||||
* <code>PixelFormat pf = new PixelFormat().withDepth(24).withSamples(4).withSRGB(true);</code>
|
||||
* <code>PixelFormat pf = new PixelFormat().withDepthBits(24).withSamples(4).withSRGB(true);</code>
|
||||
* <p/>
|
||||
* 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 {
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue