Package org.lwjgl.opengles
Class OESMapbuffer
java.lang.Object
org.lwjgl.opengles.OESMapbuffer
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Accepted by the <value> parameter of GetBufferParameteriv:static final int
Accepted by the <pname> parameter of GetBufferPointervOES:static final int
Accepted by the <value> parameter of GetBufferParameteriv:static final int
Accepted by the <access> parameter of MapBufferOES: -
Method Summary
Modifier and TypeMethodDescriptionstatic ByteBuffer
glGetBufferPointerOES
(int target, int pname, ByteBuffer old_buffer) static ByteBuffer
glGetBufferPointervOES
(int target, int pname, long length, ByteBuffer old_buffer) static ByteBuffer
glMapBufferOES
(int target, int access, long length, ByteBuffer old_buffer) glMapBufferOES maps a GL buffer object to a ByteBuffer.static ByteBuffer
glMapBufferOES
(int target, int access, ByteBuffer old_buffer) glMapBufferOES maps a GL buffer object to a ByteBuffer.static boolean
glUnmapBufferOES
(int target)
-
Field Details
-
GL_WRITE_ONLY_OES
public static final int GL_WRITE_ONLY_OESAccepted by the <access> parameter of MapBufferOES:- See Also:
-
GL_BUFFER_ACCESS_OES
public static final int GL_BUFFER_ACCESS_OESAccepted by the <value> parameter of GetBufferParameteriv:- See Also:
-
GL_BUFFER_MAPPED_OES
public static final int GL_BUFFER_MAPPED_OESAccepted by the <value> parameter of GetBufferParameteriv:- See Also:
-
GL_BUFFER_MAP_POINTER_OES
public static final int GL_BUFFER_MAP_POINTER_OESAccepted by the <pname> parameter of GetBufferPointervOES:- See Also:
-
-
Method Details
-
glGetBufferPointerOES
-
glGetBufferPointervOES
public static ByteBuffer glGetBufferPointervOES(int target, int pname, long length, ByteBuffer old_buffer) -
glMapBufferOES
glMapBufferOES maps a GL buffer 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 buffer object, otherwise a new ByteBuffer is created. That way, an application will normally use glMapBuffer like this: ByteBuffer mapped_buffer; mapped_buffer = glMapBufferOES(..., ..., null); ... // Another map on the same buffer mapped_buffer = glMapBufferOES(..., ..., 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 glGetBufferParameter internally to retrieve the current buffer 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 buffer object size, so the user is responsible for tracking and using the appropriate length.
Security warning: The length argument should match the buffer object size. Reading from or writing to outside the memory region that corresponds to the mapped buffer object will cause native crashes.- 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.
-
glMapBufferOES
glMapBufferOES maps a GL buffer 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 buffer object, otherwise a new ByteBuffer is created. That way, an application will normally use glMapBuffer like this: ByteBuffer mapped_buffer; mapped_buffer = glMapBufferOES(..., ..., null); ... // Another map on the same buffer mapped_buffer = glMapBufferOES(..., ..., 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 glGetBufferParameter internally to retrieve the current buffer 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 buffer object size, so the user is responsible for tracking and using the appropriate length.
Security warning: The length argument should match the buffer object size. Reading from or writing to outside the memory region that corresponds to the mapped buffer object will cause native crashes.- 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.
-
glUnmapBufferOES
public static boolean glUnmapBufferOES(int target)
-