Moved pbuffer supported check into native code to fix the case of no current context when creating the pbuffer

This commit is contained in:
Elias Naur 2005-01-19 13:05:07 +00:00
parent cc8f1d8fdd
commit a7fa07c2cc
3 changed files with 23 additions and 12 deletions

View file

@ -175,8 +175,6 @@ public final class Pbuffer {
* with the Display context (if created).
*/
public Pbuffer(int width, int height, PixelFormat pixel_format, RenderTexture renderTexture, Pbuffer shared_context) throws LWJGLException {
if ((getCapabilities() & PBUFFER_SUPPORTED) == 0)
throw new IllegalStateException("Pbuffers are not supported");
this.width = width;
this.height = height;
this.handle = createPbuffer(width, height, pixel_format, renderTexture, shared_context != null ? shared_context.handle : null);