From 72d44215a266ccb569efbd5af3142385c4442fe9 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Wed, 26 Feb 2014 16:54:21 +0100 Subject: Bug 984 - Fix GLBufferObjectTracker.mapBuffer(..)'s mapBufferImpl(..) parameters for mapBufferRange(..) and mapNamedBufferRange(..) GLBufferObjectTracker.mapBuffer(..) variant for mapBufferRange(..) and mapNamedBufferRange(..) used wrong parameters in it's mapBufferImpl(..) call. Fixed and added mapBufferRange(..) test in TestMapBufferRead01NEWT --- src/jogl/classes/jogamp/opengl/GLBufferObjectTracker.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/jogl') diff --git a/src/jogl/classes/jogamp/opengl/GLBufferObjectTracker.java b/src/jogl/classes/jogamp/opengl/GLBufferObjectTracker.java index 472bfbd58..2351826cb 100644 --- a/src/jogl/classes/jogamp/opengl/GLBufferObjectTracker.java +++ b/src/jogl/classes/jogamp/opengl/GLBufferObjectTracker.java @@ -298,7 +298,7 @@ public class GLBufferObjectTracker { public synchronized final GLBufferStorage mapBuffer(final GLBufferStateTracker bufferStateTracker, final GL caller, final int target, final long offset, final long length, final int access, final MapBufferRangeDispatch dispatch, final long glProcAddress) throws GLException { - return this.mapBufferImpl(bufferStateTracker, caller, target, true /* useRange */, length, access, access, dispatch, glProcAddress); + return this.mapBufferImpl(bufferStateTracker, caller, target, true /* useRange */, offset, length, access, dispatch, glProcAddress); } /** * Must be called when mapping GL buffer objects via {@link GL2#mapNamedBuffer(int, int)}. @@ -319,7 +319,7 @@ public class GLBufferObjectTracker { */ public synchronized final GLBufferStorage mapBuffer(final int bufferName, final long offset, final long length, final int access, final MapBufferRangeDispatch dispatch, final long glProcAddress) throws GLException { - return this.mapBufferImpl(0 /* target */, bufferName, true /* isNamedBuffer */, false /* useRange */, 0 /* offset */, 0 /* length */, access, dispatch, glProcAddress); + return this.mapBufferImpl(0 /* target */, bufferName, true /* isNamedBuffer */, true /* useRange */, offset, length, access, dispatch, glProcAddress); } /** * @throws GLException if buffer is not bound to target -- cgit v1.2.3