JOGL v2.6.0-rc-20250712
JOGL, High-Performance Graphics Binding for Java™ (public API).
GLUgl2ProcAddressTable.java
Go to the documentation of this file.
1/* !---- DO NOT EDIT: This file autogenerated by com/jogamp/gluegen/opengl/GLEmitter.java on Sat Jul 12 19:19:59 CEST 2025 ----! */
2/* !---- Java-Unit: [pkg com.jogamp.opengl.glu.gl2, cls GLUgl2ProcAddressTable], ../build/jogl/gensrc/classes/com/jogamp/opengl/glu/gl2/GLUgl2ProcAddressTable.java ----! */
3
4package com.jogamp.opengl.glu.gl2;
5
6import com.jogamp.common.util.SecurityUtil;
7import jogamp.opengl.glu.nurbs.*;
8import java.security.*;
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;
24
25/**
26 * This table is a cache of pointers to the dynamically-linkable C library.
27 * @see ProcAddressTable
28 */
29/* pp */ final class GLUgl2ProcAddressTable extends ProcAddressTable {
30
31
32 public GLUgl2ProcAddressTable(){ super(); }
33
34 public GLUgl2ProcAddressTable(com.jogamp.gluegen.runtime.FunctionAddressResolver resolver){ super(resolver); }
35
36 /* pp */ long _addressof_gluBuild1DMipmapLevels;
37 /* pp */ long _addressof_gluBuild1DMipmaps;
38 /* pp */ long _addressof_gluBuild2DMipmapLevels;
39 /* pp */ long _addressof_gluBuild2DMipmaps;
40 /* pp */ long _addressof_gluBuild3DMipmapLevels;
41 /* pp */ long _addressof_gluBuild3DMipmaps;
42 /* pp */ long _addressof_gluScaleImage;
43 @Override
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);
53 try {
54 addressField = GLUgl2ProcAddressTable.class.getDeclaredField( addressFieldName );
55 addressField.setAccessible(true); // we need to read the protected value!
56 return addressField;
57 } catch (NoSuchFieldException ex) { }
58 }
59 return null;
60 } } );
61
62 if(null==addressField) {
63 // The user is calling a bogus function or one which is not
64 // runtime linked
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 " +
68 "function");
69 }
70 try {
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 " +
76 "function", e);
77 }
78 }
79 @Override
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);
90 try {
91 addressField = GLUgl2ProcAddressTable.class.getDeclaredField( addressFieldName );
92 addressField.setAccessible(true); // we need to read the protected value!
93 return addressField;
94 } catch (NoSuchFieldException ex) { }
95 }
96 return null;
97 } } );
98
99 if(null==addressField) {
100 // The user is calling a bogus function or one which is not
101 // runtime linked
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 " +
105 "function");
106 }
107 try {
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 " +
113 "function", e);
114 }
115 }
116} // end of class GLUgl2ProcAddressTable