Bug 984 - GLBufferObjectTracker.mapBuffer() calls mapBufferImpl() with incorrect parameters
Summary: GLBufferObjectTracker.mapBuffer() calls mapBufferImpl() with incorrect parame...
Alias: None
Product: Jogl
Classification: JogAmp
Component: opengl (show other bugs)
Version: 2
Hardware: All all
: --- major
Assignee: Sven Gothel
Depends on:
Reported: 2014-02-25 13:52 CET by PJDM
Modified: 2014-02-26 16:58 CET (History)
0 users

See Also:
Type: ---
SCM Refs:
Workaround: ---


Note You need to log in before you can comment on or make changes to this bug.
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!

    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 ..