summaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2003-08-07 22:59:28 +0000
committerKenneth Russel <[email protected]>2003-08-07 22:59:28 +0000
commitc26d94809629a6c65d1bda01799e9356bd2386e6 (patch)
tree01c5baa7d4d104d3ca395f2db98b9480a0158baf /make
parentdb0bdc71eec40d7fcd22ddcea87178c8805d4312 (diff)
Fixed bug abies pointed out in ARBVBOKey where it was necessary to
override hashCode() and therefore equals(). Added caching of BufferUtils.bufferOffset() buffers. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@48 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'make')
-rw-r--r--make/gl-impl-CustomJavaCode.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/make/gl-impl-CustomJavaCode.java b/make/gl-impl-CustomJavaCode.java
index bd2be71f6..152458b5b 100644
--- a/make/gl-impl-CustomJavaCode.java
+++ b/make/gl-impl-CustomJavaCode.java
@@ -8,6 +8,19 @@ private static class ARBVBOKey {
this.addr = addr;
this.capacity = capacity;
}
+
+ public int hashCode() {
+ return (int) addr;
+ }
+
+ public boolean equals(Object o) {
+ if ((o == null) || (!(o instanceof ARBVBOKey))) {
+ return false;
+ }
+
+ ARBVBOKey other = (ARBVBOKey) o;
+ return ((addr == other.addr) && (capacity == other.capacity));
+ }
}
private Map/*<ARBVBOKey, ByteBuffer>*/ arbVBOCache = new HashMap();