From 0b98f807fc0c3cefacaa238f157b4a61874d6e2b Mon Sep 17 00:00:00 2001 From: Michael Bien Date: Sat, 24 Apr 2010 18:13:36 +0200 Subject: Refactored ProcAddressTable generation. - ProcAddressTable is now the common superclass for all tables - Removed ProcAddressHelpers and added FunctionAddressResolver extension mechanism --- src/java/com/sun/gluegen/opengl/GLEmitter.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/java/com/sun') diff --git a/src/java/com/sun/gluegen/opengl/GLEmitter.java b/src/java/com/sun/gluegen/opengl/GLEmitter.java index 006287e02..b5df6ff2d 100644 --- a/src/java/com/sun/gluegen/opengl/GLEmitter.java +++ b/src/java/com/sun/gluegen/opengl/GLEmitter.java @@ -419,17 +419,17 @@ public class GLEmitter extends ProcAddressEmitter { w.println(" * it was statically linked."); w.println(" */"); w.println(" public long getAddressFor(String functionNameUsr) {"); - w.println(" String functionNameBase = com.jogamp.gluegen.runtime.opengl.GLExtensionNames.normalizeVEN(com.jogamp.gluegen.runtime.opengl.GLExtensionNames.normalizeARB(functionNameUsr, true), true);"); - w.println(" String addressFieldNameBase = " + getProcAddressConfig().gluegenRuntimePackage() + ".ProcAddressHelper.PROCADDRESS_VAR_PREFIX + functionNameBase;"); + w.println(" String functionNameBase = "+GLExtensionNames.class.getName()+".normalizeVEN(com.jogamp.gluegen.runtime.opengl.GLExtensionNames.normalizeARB(functionNameUsr, true), true);"); + w.println(" String addressFieldNameBase = PROCADDRESS_VAR_PREFIX + functionNameBase;"); w.println(" java.lang.reflect.Field addressField = null;"); - w.println(" int funcNamePermNum = com.jogamp.gluegen.runtime.opengl.GLExtensionNames.getFuncNamePermutationNumber(functionNameBase);"); + w.println(" int funcNamePermNum = "+GLExtensionNames.class.getName()+".getFuncNamePermutationNumber(functionNameBase);"); w.println(" for(int i = 0; null==addressField && i < funcNamePermNum; i++) {"); - w.println(" String addressFieldName = com.jogamp.gluegen.runtime.opengl.GLExtensionNames.getFuncNamePermutation(addressFieldNameBase, i);"); + w.println(" String addressFieldName = "+GLExtensionNames.class.getName()+".getFuncNamePermutation(addressFieldNameBase, i);"); w.println(" try {"); w.println(" addressField = getClass().getField(addressFieldName);"); w.println(" } catch (Exception e) { }"); w.println(" }"); - w.println(""); + w.println(); w.println(" if(null==addressField) {"); w.println(" // The user is calling a bogus function or one which is not"); w.println(" // runtime linked"); -- cgit v1.2.3