javax.media.opengl.glu.gl2.GLUgl2ProcAddressTable Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jogl-all Show documentation
Show all versions of jogl-all Show documentation
Java™ Binding for the OpenGL® API
/* !---- DO NOT EDIT: This file autogenerated by com/jogamp/gluegen/opengl/GLEmitter.java on Fri Nov 01 19:11:24 CET 2013 ----! */
package javax.media.opengl.glu.gl2;
import jogamp.opengl.glu.nurbs.*;
import java.security.*;
import com.jogamp.gluegen.runtime.opengl.GLProcAddressResolver;
import jogamp.opengl.glu.gl2.nurbs.*;
import jogamp.opengl.glu.mipmap.Mipmap;
import jogamp.opengl.glu.gl2.*;
import javax.media.opengl.GL2;
import jogamp.opengl.gl2.ProjectDouble;
import javax.media.opengl.*;
import javax.media.opengl.glu.*;
import com.jogamp.opengl.util.glsl.ShaderState;
import jogamp.opengl.*;
import jogamp.opengl.glu.*;
import jogamp.opengl.glu.tessellator.GLUtessellatorImpl;
import jogamp.opengl.ProjectFloat;
import com.jogamp.common.util.ReflectionUtil;
import com.jogamp.gluegen.runtime.ProcAddressTable;
import com.jogamp.common.util.SecurityUtil;
/**
* This table is a cache of pointers to the dynamically-linkable C library.
* @see ProcAddressTable
*/
/* pp */ final class GLUgl2ProcAddressTable extends ProcAddressTable {
public GLUgl2ProcAddressTable(){ super(); }
public GLUgl2ProcAddressTable(com.jogamp.gluegen.runtime.FunctionAddressResolver resolver){ super(resolver); }
/* pp */ long _addressof_gluBuild1DMipmapLevelsC;
/* pp */ long _addressof_gluBuild1DMipmapsC;
/* pp */ long _addressof_gluBuild2DMipmapLevelsC;
/* pp */ long _addressof_gluBuild2DMipmapsC;
/* pp */ long _addressof_gluBuild3DMipmapLevelsC;
/* pp */ long _addressof_gluBuild3DMipmapsC;
/* pp */ long _addressof_gluScaleImageC;
@Override
protected boolean isFunctionAvailableImpl(String functionNameUsr) throws IllegalArgumentException {
final String functionNameBase = com.jogamp.gluegen.runtime.opengl.GLNameResolver.normalizeVEN(com.jogamp.gluegen.runtime.opengl.GLNameResolver.normalizeARB(functionNameUsr, true), true);
final String addressFieldNameBase = "_addressof_" + functionNameBase;
final int funcNamePermNum = com.jogamp.gluegen.runtime.opengl.GLNameResolver.getFuncNamePermutationNumber(functionNameBase);
final java.lang.reflect.Field addressField = java.security.AccessController.doPrivileged(new java.security.PrivilegedAction() {
public final java.lang.reflect.Field run() {
java.lang.reflect.Field addressField = null;
for(int i = 0; i < funcNamePermNum; i++) {
final String addressFieldName = com.jogamp.gluegen.runtime.opengl.GLNameResolver.getFuncNamePermutation(addressFieldNameBase, i);
try {
addressField = GLUgl2ProcAddressTable.class.getDeclaredField( addressFieldName );
addressField.setAccessible(true); // we need to read the protected value!
return addressField;
} catch (NoSuchFieldException ex) { }
}
return null;
} } );
if(null==addressField) {
// The user is calling a bogus function or one which is not
// runtime linked
throw new RuntimeException(
"WARNING: Address field query failed for \"" + functionNameBase + "\"/\"" + functionNameUsr +
"\"; it's either statically linked or address field is not a known " +
"function");
}
try {
return 0 != addressField.getLong(this);
} catch (Exception e) {
throw new RuntimeException(
"WARNING: Address query failed for \"" + functionNameBase + "\"/\"" + functionNameUsr +
"\"; it's either statically linked or is not a known " +
"function", e);
}
}
@Override
public long getAddressFor(String functionNameUsr) throws SecurityException, IllegalArgumentException {
SecurityUtil.checkAllLinkPermission();
final String functionNameBase = com.jogamp.gluegen.runtime.opengl.GLNameResolver.normalizeVEN(com.jogamp.gluegen.runtime.opengl.GLNameResolver.normalizeARB(functionNameUsr, true), true);
final String addressFieldNameBase = "_addressof_" + functionNameBase;
final int funcNamePermNum = com.jogamp.gluegen.runtime.opengl.GLNameResolver.getFuncNamePermutationNumber(functionNameBase);
final java.lang.reflect.Field addressField = java.security.AccessController.doPrivileged(new java.security.PrivilegedAction() {
public final java.lang.reflect.Field run() {
java.lang.reflect.Field addressField = null;
for(int i = 0; i < funcNamePermNum; i++) {
final String addressFieldName = com.jogamp.gluegen.runtime.opengl.GLNameResolver.getFuncNamePermutation(addressFieldNameBase, i);
try {
addressField = GLUgl2ProcAddressTable.class.getDeclaredField( addressFieldName );
addressField.setAccessible(true); // we need to read the protected value!
return addressField;
} catch (NoSuchFieldException ex) { }
}
return null;
} } );
if(null==addressField) {
// The user is calling a bogus function or one which is not
// runtime linked
throw new RuntimeException(
"WARNING: Address field query failed for \"" + functionNameBase + "\"/\"" + functionNameUsr +
"\"; it's either statically linked or address field is not a known " +
"function");
}
try {
return addressField.getLong(this);
} catch (Exception e) {
throw new RuntimeException(
"WARNING: Address query failed for \"" + functionNameBase + "\"/\"" + functionNameUsr +
"\"; it's either statically linked or is not a known " +
"function", e);
}
}
} // end of class GLUgl2ProcAddressTable