Inertia's picture

ARB_map_buffer_range

Project:The Open Toolkit library
Version:0.9.7
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:closed
Description

http://www.opengl.org/registry/specs/ARB/map_buffer_range.txt

Functions:

C: void *MapBufferRange( enum target, intptr offset, sizeiptr length, bitfield access );
Old: void MapBufferRange(OpenTK.Graphics.All target, IntPtr offset, IntPtr length, UInt32 access)
New: IntPtr MapBufferRange(OpenTK.Graphics.BufferTargetArb target, IntPtr offset, IntPtr length, Enum.X access)

The "Old" is wrong, the function returns a (void*). Quote the spec: "If no error occurs, a pointer to the beginning of the mapped range is returned and may be used to modify and/or query the corresponding range of the buffer, according to the access flags."

C: void FlushMappedBufferRange( enum target, intptr offset, sizeiptr length );
Old: void FlushMappedBufferRange(OpenTK.Graphics.All target, IntPtr offset, IntPtr length)
New: void FlushMappedBufferRange(OpenTK.Graphics.BufferTargetArb target, IntPtr offset, IntPtr length)

Tokens:

enum X (This enum is not identical with OpenTK.Graphics.BufferAccess although similar)
{
MAP_READ_BIT 0x0001
MAP_WRITE_BIT 0x0002
MAP_INVALIDATE_RANGE_BIT 0x0004
MAP_INVALIDATE_BUFFER_BIT 0x0008
MAP_FLUSH_EXPLICIT_BIT 0x0010
MAP_UNSYNCHRONIZED_BIT 0x0020
}

Example usage from spec:

 /* Map the entire buffer as write only */
    void *ptr = glMapBufferRange( GL_ARRAY_BUFFER_ARB, 0, size, MAP_WRITE_BIT );

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture

#1

Status:open» fixed

Committed to rev. 1677.

the Fiddler's picture

#2

Version:0.9.x-dev» 0.9.7
Status:fixed» closed

Closing issues fixed in 0.9.7.