summaryrefslogtreecommitdiffstats
path: root/src/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java')
-rwxr-xr-xsrc/java/com/sun/gluegen/runtime/DynamicLookupHelper.java3
-rw-r--r--src/java/com/sun/gluegen/runtime/ProcAddressHelper.java2
-rw-r--r--src/java/com/sun/gluegen/runtime/opengl/GLProcAddressHelper.java8
3 files changed, 7 insertions, 6 deletions
diff --git a/src/java/com/sun/gluegen/runtime/DynamicLookupHelper.java b/src/java/com/sun/gluegen/runtime/DynamicLookupHelper.java
index 07417f9..ad3de7f 100755
--- a/src/java/com/sun/gluegen/runtime/DynamicLookupHelper.java
+++ b/src/java/com/sun/gluegen/runtime/DynamicLookupHelper.java
@@ -46,5 +46,8 @@ package com.sun.gluegen.runtime;
code. */
public interface DynamicLookupHelper {
+ /**
+ * Try to fetch the function pointer for function 'funcName'.
+ */
public long dynamicLookupFunction(String funcName);
}
diff --git a/src/java/com/sun/gluegen/runtime/ProcAddressHelper.java b/src/java/com/sun/gluegen/runtime/ProcAddressHelper.java
index 7e2708f..f0dbe8b 100644
--- a/src/java/com/sun/gluegen/runtime/ProcAddressHelper.java
+++ b/src/java/com/sun/gluegen/runtime/ProcAddressHelper.java
@@ -107,7 +107,7 @@ public class ProcAddressHelper {
// set the current value of the proc address variable in the table object
addressField.setLong(table, newProcAddress);
if (DEBUG) {
- dout.println(" " + addressField.getName() + " = 0x" + Long.toHexString(newProcAddress));
+ dout.println(" " + addressField.getName() + " -> 0x" + Long.toHexString(newProcAddress));
}
} catch (Exception e) {
throw new RuntimeException("Can not get proc address for method \"" +
diff --git a/src/java/com/sun/gluegen/runtime/opengl/GLProcAddressHelper.java b/src/java/com/sun/gluegen/runtime/opengl/GLProcAddressHelper.java
index 3f88261..4110b6f 100644
--- a/src/java/com/sun/gluegen/runtime/opengl/GLProcAddressHelper.java
+++ b/src/java/com/sun/gluegen/runtime/opengl/GLProcAddressHelper.java
@@ -76,12 +76,10 @@ public class GLProcAddressHelper extends ProcAddressHelper {
}
long newProcAddress = 0;
int funcNamePermNum = GLExtensionNames.getFuncNamePermutationNumber(funcNameBase);
+ String funcName = null;
for(int j = 0; 0==newProcAddress && j < funcNamePermNum; j++) {
- String funcName = GLExtensionNames.getFuncNamePermutation(funcNameBase, j);
+ funcName = GLExtensionNames.getFuncNamePermutation(funcNameBase, j);
try {
- if (DEBUG) {
- dout.println(" try function lookup: " + funcName + " / " + funcNameBase);
- }
newProcAddress = lookup.dynamicLookupFunction(funcName);
} catch (Exception e) {
if (DEBUG) {
@@ -94,7 +92,7 @@ public class GLProcAddressHelper extends ProcAddressHelper {
// set the current value of the proc address variable in the table object
addressField.setLong(table, newProcAddress);
if (DEBUG) {
- dout.println(" " + addressField.getName() + " = 0x" + Long.toHexString(newProcAddress));
+ dout.println(" " + addressField.getName() + " "+funcName+" -> 0x" + Long.toHexString(newProcAddress));
}
} catch (Exception e) {
throw new RuntimeException("Can not set proc address field for method \"" +