4package com.jogamp.opengl.glu.gl2;
6import com.jogamp.common.util.SecurityUtil;
7import jogamp.opengl.glu.nurbs.*;
9import com.jogamp.gluegen.runtime.opengl.GLProcAddressResolver;
10import jogamp.opengl.glu.gl2.nurbs.*;
11import jogamp.opengl.glu.mipmap.Mipmap;
12import com.jogamp.opengl.GL2;
13import jogamp.opengl.gl2.ProjectDouble;
14import com.jogamp.opengl.*;
15import com.jogamp.opengl.glu.*;
16import com.jogamp.opengl.util.glsl.ShaderState;
17import jogamp.opengl.*;
18import jogamp.opengl.glu.*;
19import jogamp.opengl.glu.tessellator.GLUtessellatorImpl;
20import jogamp.opengl.ProjectFloat;
21import com.jogamp.common.util.ReflectionUtil;
22import com.jogamp.gluegen.runtime.ProcAddressTable;
23import com.jogamp.common.util.SecurityUtil;
29 final class GLUgl2ProcAddressTable
extends ProcAddressTable {
32 public GLUgl2ProcAddressTable(){ super(); }
34 public GLUgl2ProcAddressTable(com.jogamp.gluegen.runtime.FunctionAddressResolver resolver){ super(resolver); }
36 long _addressof_gluBuild1DMipmapLevels;
37 long _addressof_gluBuild1DMipmaps;
38 long _addressof_gluBuild2DMipmapLevels;
39 long _addressof_gluBuild2DMipmaps;
40 long _addressof_gluBuild3DMipmapLevels;
41 long _addressof_gluBuild3DMipmaps;
42 long _addressof_gluScaleImage;
44 protected boolean isFunctionAvailableImpl(String functionNameUsr)
throws IllegalArgumentException {
45 final String functionNameBase = com.jogamp.gluegen.runtime.opengl.GLNameResolver.normalizeVEN(com.jogamp.gluegen.runtime.opengl.GLNameResolver.normalizeARB(functionNameUsr,
true),
true);
46 final String addressFieldNameBase =
"_addressof_" + functionNameBase;
47 final int funcNamePermNum = com.jogamp.gluegen.runtime.opengl.GLNameResolver.getFuncNamePermutationNumber(functionNameBase);
48 final java.lang.reflect.Field addressField = com.jogamp.common.util.SecurityUtil.doPrivileged(
new java.security.PrivilegedAction<java.lang.reflect.Field>() {
49 public final java.lang.reflect.Field run() {
50 java.lang.reflect.Field addressField = null;
51 for(int i = 0; i < funcNamePermNum; i++) {
52 final String addressFieldName = com.jogamp.gluegen.runtime.opengl.GLNameResolver.getFuncNamePermutation(addressFieldNameBase, i);
54 addressField = GLUgl2ProcAddressTable.class.getDeclaredField( addressFieldName );
55 addressField.setAccessible(true);
57 } catch (NoSuchFieldException ex) { }
62 if(
null==addressField) {
65 throw new RuntimeException(
66 "WARNING: Address field query failed for \"" + functionNameBase +
"\"/\"" + functionNameUsr +
67 "\"; it's either statically linked or address field is not a known " +
71 return 0 != addressField.getLong(
this);
72 }
catch (Exception e) {
73 throw new RuntimeException(
74 "WARNING: Address query failed for \"" + functionNameBase +
"\"/\"" + functionNameUsr +
75 "\"; it's either statically linked or is not a known " +
80 public long getAddressFor(String functionNameUsr)
throws SecurityException, IllegalArgumentException {
81 SecurityUtil.checkAllLinkPermission();
82 final String functionNameBase = com.jogamp.gluegen.runtime.opengl.GLNameResolver.normalizeVEN(com.jogamp.gluegen.runtime.opengl.GLNameResolver.normalizeARB(functionNameUsr,
true),
true);
83 final String addressFieldNameBase =
"_addressof_" + functionNameBase;
84 final int funcNamePermNum = com.jogamp.gluegen.runtime.opengl.GLNameResolver.getFuncNamePermutationNumber(functionNameBase);
85 final java.lang.reflect.Field addressField = com.jogamp.common.util.SecurityUtil.doPrivileged(
new java.security.PrivilegedAction<java.lang.reflect.Field>() {
86 public final java.lang.reflect.Field run() {
87 java.lang.reflect.Field addressField = null;
88 for(int i = 0; i < funcNamePermNum; i++) {
89 final String addressFieldName = com.jogamp.gluegen.runtime.opengl.GLNameResolver.getFuncNamePermutation(addressFieldNameBase, i);
91 addressField = GLUgl2ProcAddressTable.class.getDeclaredField( addressFieldName );
92 addressField.setAccessible(true);
94 } catch (NoSuchFieldException ex) { }
99 if(
null==addressField) {
102 throw new RuntimeException(
103 "WARNING: Address field query failed for \"" + functionNameBase +
"\"/\"" + functionNameUsr +
104 "\"; it's either statically linked or address field is not a known " +
108 return addressField.getLong(
this);
109 }
catch (Exception e) {
110 throw new RuntimeException(
111 "WARNING: Address query failed for \"" + functionNameBase +
"\"/\"" + functionNameUsr +
112 "\"; it's either statically linked or is not a known " +