From 9d770148ca221279ddb4b733368d0628dd7dbaf3 Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Tue, 18 Jan 2005 11:58:33 +0000 Subject: [PATCH] Added supported check to Pbuffer constructor --- src/java/org/lwjgl/opengl/Pbuffer.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/java/org/lwjgl/opengl/Pbuffer.java b/src/java/org/lwjgl/opengl/Pbuffer.java index 06e936aa..05ee00c1 100644 --- a/src/java/org/lwjgl/opengl/Pbuffer.java +++ b/src/java/org/lwjgl/opengl/Pbuffer.java @@ -175,6 +175,8 @@ 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 ((getPbufferCaps() & 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);