From 69e9ae0bd6ada2177562714e301d68480eb001b8 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 30 Mar 2011 16:09:59 +0200 Subject: VBORegion2PGL3 -> VBORegion2PES2 --- src/com/jogamp/graph/curve/RegionFactory.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/com/jogamp') diff --git a/src/com/jogamp/graph/curve/RegionFactory.java b/src/com/jogamp/graph/curve/RegionFactory.java index 158f9db5b..fe77e1be5 100755 --- a/src/com/jogamp/graph/curve/RegionFactory.java +++ b/src/com/jogamp/graph/curve/RegionFactory.java @@ -28,11 +28,12 @@ package com.jogamp.graph.curve; import javax.media.opengl.GLContext; +import javax.media.opengl.GLException; import com.jogamp.opengl.util.glsl.ShaderState; import jogamp.graph.curve.opengl.VBORegionSPES2; -import jogamp.graph.curve.opengl.VBORegion2PGL3; +import jogamp.graph.curve.opengl.VBORegion2PES2; /** RegionFactory to create a Context specific Region implementation. @@ -48,8 +49,11 @@ public class RegionFactory { * @return region */ public static Region create(GLContext context, ShaderState st, int type){ - if(Region.TWO_PASS == type && context.isGL3()){ - return new VBORegion2PGL3(context, st); + if( !context.isGL2ES2() ) { + throw new GLException("At least a GL2ES2 GL context is required. Given: " + context); + } + if( Region.TWO_PASS == type ){ + return new VBORegion2PES2(context, st); } else{ return new VBORegionSPES2(context); -- cgit v1.2.3