org.lwjgl.opengl
Class ARBMapBufferRange

java.lang.Object
  extended by org.lwjgl.opengl.ARBMapBufferRange

public final class ARBMapBufferRange
extends java.lang.Object


Field Summary
static int GL_MAP_FLUSH_EXPLICIT_BIT
          Accepted by the <access> parameter of MapBufferRange:
static int GL_MAP_INVALIDATE_BUFFER_BIT
          Accepted by the <access> parameter of MapBufferRange:
static int GL_MAP_INVALIDATE_RANGE_BIT
          Accepted by the <access> parameter of MapBufferRange:
static int GL_MAP_READ_BIT
          Accepted by the <access> parameter of MapBufferRange:
static int GL_MAP_UNSYNCHRONIZED_BIT
          Accepted by the <access> parameter of MapBufferRange:
static int GL_MAP_WRITE_BIT
          Accepted by the <access> parameter of MapBufferRange:
 
Method Summary
static void glFlushMappedBufferRange(int target, long offset, long length)
           
static java.nio.ByteBuffer glMapBufferRange(int target, long offset, long length, int access, java.nio.ByteBuffer old_buffer)
          glMapBufferRange maps a GL buffer object range to a ByteBuffer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GL_MAP_READ_BIT

public static final int GL_MAP_READ_BIT
Accepted by the <access> parameter of MapBufferRange:

See Also:
Constant Field Values

GL_MAP_WRITE_BIT

public static final int GL_MAP_WRITE_BIT
Accepted by the <access> parameter of MapBufferRange:

See Also:
Constant Field Values

GL_MAP_INVALIDATE_RANGE_BIT

public static final int GL_MAP_INVALIDATE_RANGE_BIT
Accepted by the <access> parameter of MapBufferRange:

See Also:
Constant Field Values

GL_MAP_INVALIDATE_BUFFER_BIT

public static final int GL_MAP_INVALIDATE_BUFFER_BIT
Accepted by the <access> parameter of MapBufferRange:

See Also:
Constant Field Values

GL_MAP_FLUSH_EXPLICIT_BIT

public static final int GL_MAP_FLUSH_EXPLICIT_BIT
Accepted by the <access> parameter of MapBufferRange:

See Also:
Constant Field Values

GL_MAP_UNSYNCHRONIZED_BIT

public static final int GL_MAP_UNSYNCHRONIZED_BIT
Accepted by the <access> parameter of MapBufferRange:

See Also:
Constant Field Values
Method Detail

glMapBufferRange

public static java.nio.ByteBuffer glMapBufferRange(int target,
                                                   long offset,
                                                   long length,
                                                   int access,
                                                   java.nio.ByteBuffer old_buffer)
glMapBufferRange maps a GL buffer object range to a ByteBuffer. The old_buffer argument can be null, in which case a new ByteBuffer will be created, pointing to the returned memory. If old_buffer is non-null, it will be returned if it points to the same mapped memory and has the same capacity as the buffer object, otherwise a new ByteBuffer is created. That way, an application will normally use glMapBufferRange like this:

ByteBuffer mapped_buffer; mapped_buffer = glMapBufferRange(..., ..., ..., ..., null); ... // Another map on the same buffer mapped_buffer = glMapBufferRange(..., ..., ..., ..., mapped_buffer);

Only ByteBuffers returned from this method are to be passed as the old_buffer argument. User-created ByteBuffers cannot be reused.

Parameters:
old_buffer - A ByteBuffer. If this argument points to the same address and has the same capacity as the new mapping, it will be returned and no new buffer will be created.

Returns:
A ByteBuffer representing the mapped buffer memory.

glFlushMappedBufferRange

public static void glFlushMappedBufferRange(int target,
                                            long offset,
                                            long length)


Copyright © 2002-2009 lwjgl.org. All Rights Reserved.