Bug 984

Summary: GLBufferObjectTracker.mapBuffer() calls mapBufferImpl() with incorrect parameters
Product: [JogAmp] Jogl Reporter: PJDM <pjd.mayne+jogl>
Component: openglAssignee: Sven Gothel <sgothel>
Status: RESOLVED FIXED    
Severity: major    
Priority: ---    
Version: 2   
Hardware: All   
OS: all   
Type: --- SCM Refs:
72d44215a266ccb569efbd5af3142385c4442fe9
Workaround: ---

Description PJDM 2014-02-25 13:52:38 CET
JOGL v2.1.4

At jogamp.opengl.GLBufferObjectTracker.mapBuffer(GLBufferObjectTracker.java:301)

    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);
    }

The parameters in the call to this.mapBufferImpl()
    ..., length, access, access, ...
should be
    ..., offset, length, access, ...

This causes GL.glMapBufferRange() to fail.
Comment 1 Sven Gothel 2014-02-26 16:55:02 CET
Thank you PJDM!

72d44215a266ccb569efbd5af3142385c4442fe9    
    GLBufferObjectTracker.mapBuffer(..) variant for mapBufferRange(..) and mapNamedBufferRange(..)
    used wrong parameters in it's mapBufferImpl(..) call.
    
    Fixed and added mapBufferRange(..) test in TestMapBufferRead01NEWT
Comment 2 Sven Gothel 2014-02-26 16:58:03 CET
Annotation: Quite a sloppy typo / copy-paste bug ..