From c26d94809629a6c65d1bda01799e9356bd2386e6 Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Thu, 7 Aug 2003 22:59:28 +0000 Subject: 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 --- make/gl-impl-CustomJavaCode.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'make') 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/**/ arbVBOCache = new HashMap(); -- cgit v1.2.3