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.
This commit is contained in:
parent
4bf4a385f3
commit
d6207572c6
|
@ -158,6 +158,24 @@ public final class Pbuffer implements Drawable {
|
||||||
Sys.initialize();
|
Sys.initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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/>
|
||||||
|
*
|
||||||
|
* @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.
|
* Create an instance of a Pbuffer with a unique OpenGL context. The buffer is single-buffered.
|
||||||
* <p/>
|
* <p/>
|
||||||
|
@ -167,7 +185,8 @@ public final class Pbuffer implements Drawable {
|
||||||
* <p/>
|
* <p/>
|
||||||
* The renderTexture parameter defines the necessary state for enabling render-to-texture. When this parameter is null,
|
* 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
|
* 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/>
|
* <p/>
|
||||||
*
|
*
|
||||||
* @param width Pbuffer width
|
* @param width Pbuffer width
|
||||||
|
|
Loading…
Reference in New Issue