aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2009-06-05 05:06:52 +0000
committerSven Gothel <[email protected]>2009-06-05 05:06:52 +0000
commit916c9a11836a0a78176e138c19521a118eff350f (patch)
tree7bce50693693e83a7245a4b09737e8c0a45f538f /src
parentb1be10c6b8e7aded4883060f5f0c3ede8b869c69 (diff)
Better debug/verbose output
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/gluegen/branches/JOGL_2_SANDBOX@142 a78bb65f-1512-4460-ba86-f6dc96a7bf27
Diffstat (limited to 'src')
-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 \"" +