|
From: <sp...@us...> - 2011-08-24 23:19:03
|
Revision: 3621
http://java-game-lib.svn.sourceforge.net/java-game-lib/?rev=3621&view=rev
Author: spasi
Date: 2011-08-24 23:18:56 +0000 (Wed, 24 Aug 2011)
Log Message:
-----------
Fixed Pbuffer init when Display has not been created.
Modified Paths:
--------------
trunk/LWJGL/src/java/org/lwjgl/opengl/Pbuffer.java
trunk/LWJGL/src/java/org/lwjgl/opengl/PixelFormat.java
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/Pbuffer.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/Pbuffer.java 2011-08-20 16:38:45 UTC (rev 3620)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/Pbuffer.java 2011-08-24 23:18:56 UTC (rev 3621)
@@ -217,11 +217,11 @@
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);
}
Modified: trunk/LWJGL/src/java/org/lwjgl/opengl/PixelFormat.java
===================================================================
--- trunk/LWJGL/src/java/org/lwjgl/opengl/PixelFormat.java 2011-08-20 16:38:45 UTC (rev 3620)
+++ trunk/LWJGL/src/java/org/lwjgl/opengl/PixelFormat.java 2011-08-24 23:18:56 UTC (rev 3621)
@@ -38,7 +38,7 @@
* <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 @@
* @author eli...@so...
* @version $Revision$
*/
-
public final class PixelFormat implements PixelFormatLWJGL {
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|