Package org.lwjgl.opengl
Class ATIMapObjectBuffer
- java.lang.Object
-
- org.lwjgl.opengl.ATIMapObjectBuffer
-
public final class ATIMapObjectBuffer extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.nio.ByteBuffer
glMapObjectBufferATI(int buffer, long length, java.nio.ByteBuffer old_buffer)
glMapObjectBufferATI maps an ATI vertex array object to a ByteBuffer.static java.nio.ByteBuffer
glMapObjectBufferATI(int buffer, java.nio.ByteBuffer old_buffer)
glMapObjectBufferATI maps an ATI vertex array object to a ByteBuffer.static void
glUnmapObjectBufferATI(int buffer)
-
-
-
Method Detail
-
glMapObjectBufferATI
public static java.nio.ByteBuffer glMapObjectBufferATI(int buffer, java.nio.ByteBuffer old_buffer)
glMapObjectBufferATI maps an ATI vertex array object 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 vertex array object, otherwise a new ByteBuffer is created. That way, an application will normally use glMapObjectBufferATI like this: ByteBuffer mapped_buffer; mapped_buffer = glMapObjectBufferATI(..., null); ... // Another map on the same buffer mapped_buffer = glMapObjectBufferATI(..., mapped_buffer); Only ByteBuffers returned from this method are to be passed as the old_buffer argument. User-created ByteBuffers cannot be reused. The version of this method without an explicit length argument calls glGetObjectBufferATI internally to retrieve the current vertex array object size, which may cause a pipeline flush and reduce application performance. The version of this method with an explicit length argument is a fast alternative to the one without. No GL call is made to retrieve the vertex array object size, so the user is responsible for tracking and using the appropriate length.
Security warning: The length argument should match the vertex array object size. Reading from or writing to outside the memory region that corresponds to the mapped vertex array object will cause native crashes.- Parameters:
length
- the length of the mapped memory in bytes.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.
-
glMapObjectBufferATI
public static java.nio.ByteBuffer glMapObjectBufferATI(int buffer, long length, java.nio.ByteBuffer old_buffer)
glMapObjectBufferATI maps an ATI vertex array object 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 vertex array object, otherwise a new ByteBuffer is created. That way, an application will normally use glMapObjectBufferATI like this: ByteBuffer mapped_buffer; mapped_buffer = glMapObjectBufferATI(..., null); ... // Another map on the same buffer mapped_buffer = glMapObjectBufferATI(..., mapped_buffer); Only ByteBuffers returned from this method are to be passed as the old_buffer argument. User-created ByteBuffers cannot be reused. The version of this method without an explicit length argument calls glGetObjectBufferATI internally to retrieve the current vertex array object size, which may cause a pipeline flush and reduce application performance. The version of this method with an explicit length argument is a fast alternative to the one without. No GL call is made to retrieve the vertex array object size, so the user is responsible for tracking and using the appropriate length.
Security warning: The length argument should match the vertex array object size. Reading from or writing to outside the memory region that corresponds to the mapped vertex array object will cause native crashes.- Parameters:
length
- the length of the mapped memory in bytes.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.
-
glUnmapObjectBufferATI
public static void glUnmapObjectBufferATI(int buffer)
-
-