summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-03-30 16:09:59 +0200
committerSven Gothel <[email protected]>2011-03-30 16:09:59 +0200
commit69e9ae0bd6ada2177562714e301d68480eb001b8 (patch)
tree0e5b01d82873ebacf449a11fd9e794d58005ba10 /src/com
parent8e5d620eae1dcc1f1178e09c1d5172324541f503 (diff)
VBORegion2PGL3 -> VBORegion2PES2
Diffstat (limited to 'src/com')
-rwxr-xr-xsrc/com/jogamp/graph/curve/RegionFactory.java10
1 files changed, 7 insertions, 3 deletions
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);