diff options
Diffstat (limited to 'gl4java/GLContext.java.skel')
-rw-r--r-- | gl4java/GLContext.java.skel | 35 |
1 files changed, 27 insertions, 8 deletions
diff --git a/gl4java/GLContext.java.skel b/gl4java/GLContext.java.skel index 8390bd0..0bf5461 100644 --- a/gl4java/GLContext.java.skel +++ b/gl4java/GLContext.java.skel @@ -67,7 +67,8 @@ import java.security.*; <p> GL4JavaJauGljJNI (jdk ==1.1), GL4JavaJauGljJNI12 (jdk ==1.2), - GL4JavaJauGljJNI13 (jdk >=1.3) + GL4JavaJauGljJNI13 (jdk ==1.3) + GL4JavaJauGljJNI14 (jdk >=1.4) <p> To check wich version and vendors are currently used, just call while a GLContext is created : @@ -194,12 +195,14 @@ public class GLContext extends Object * */ public static final String defGLFuncClass = "GLFuncJauJNI" ; + public static final String defGLFunc14Class = "GLFunc14JauJNI" ; /** * The default GLUFunc implementation * */ public static final String defGLUFuncClass = "GLUFuncJauJNI" ; + public static final String defGLUFunc14Class = "GLUFunc14JauJNI" ; /** * The default native GL library ... for X11 @@ -705,7 +708,7 @@ public class GLContext extends Object ( jvmVersionMajor==1 && jvmVersionMinor>=4 ) ) { - jniEXTsuff = "13"; + jniEXTsuff = "14"; } else @@ -930,8 +933,8 @@ public class GLContext extends Object String nativeGLLib = null; String nativeGLULib = null; String gljLibName = null; - String glName = defGLFuncClass; - String gluName = defGLUFuncClass; + String glName = null; + String gluName = null; boolean info=false; boolean exitImmediatly=false; boolean noFactory=false; @@ -995,13 +998,13 @@ public class GLContext extends Object } if( (gl=GLContext.createGLFunc(glName)) !=null) - System.out.println("GLFunc implementation "+glName+" created succesfull"); + System.out.println("GLFunc implementation "+gl.getClass().getName()+" created succesfull"); else { System.out.println("GLFunc implementation "+glName+" not created"); ok=false; } if( (glu=GLContext.createGLUFunc(gluName)) !=null) - System.out.println("GLUFunc implementation "+gluName+" created succesfull"); + System.out.println("GLUFunc implementation "+glu.getClass().getName()+" created succesfull"); else { System.out.println("GLUFunc implementation "+gluName+" not created"); ok=false; @@ -1674,7 +1677,12 @@ public class GLContext extends Object if(vendorClass==null) { - vendorClass = defGLFuncClass ; + if (jvmVersionMajor>=2 || + (jvmVersionMajor==1 && jvmVersionMinor>=4)) { + vendorClass = defGLFunc14Class; + } else { + vendorClass = defGLFuncClass; + } } String clazzName = access_name + vendorClass ; @@ -1719,7 +1727,12 @@ public class GLContext extends Object if(vendorClass==null) { + if (jvmVersionMajor>=2 || + (jvmVersionMajor==1 && jvmVersionMinor>=4)) { + vendorClass = defGLUFunc14Class ; + } else { vendorClass = defGLUFuncClass ; + } } @@ -2891,6 +2904,7 @@ public class GLContext extends Object String h; String tmp; + int okNum=0; for(int i=0; i<GLFunc.GL_PROC_NAMES.length; i++) { @@ -2898,12 +2912,17 @@ public class GLContext extends Object if(h==null) break; if(gljTestGLProc (h, verbose)) + { tmp= "#"+i+" OK : "+h+"\n"; - else + okNum++; + } else tmp= "#"+i+" NOPE : "+h+"\n"; info3 += tmp; } + info3 += "-----------------------------------------------\n"; + info3 += "Got "+okNum+" / "+GLFunc.GL_PROC_NAMES.length+" Functions \n"; + info3 += "===============================================\n"; return info1+"\n"+info2+"\n"+info3; } |