Top Fields Constructors Methods
org.lwjgl.opengles

public final Class OESMapbuffer

extends Object
Class Inheritance
Imports
org.lwjgl.*, java.nio.*

Field Summary

Modifier and TypeField and Description
public static final int
GL_BUFFER_ACCESS_OES

Accepted by the <value> parameter of GetBufferParameteriv:

public static final int
GL_BUFFER_MAP_POINTER_OES

Accepted by the <pname> parameter of GetBufferPointervOES:

public static final int
GL_BUFFER_MAPPED_OES

Accepted by the <value> parameter of GetBufferParameteriv:

public static final int
GL_WRITE_ONLY_OES

Accepted by the <access> parameter of MapBufferOES:

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static ByteBuffer
glGetBufferPointerOES(int target, int pname, ByteBuffer old_buffer)

public static ByteBuffer
glGetBufferPointervOES(int target, int pname, long length, ByteBuffer old_buffer)

public static ByteBuffer

Returns:

A ByteBuffer representing the mapped buffer memory.
glMapBufferOES
(int target, int access, ByteBuffer
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.

old_buffer
)

glMapBufferOES maps a GL buffer object to a ByteBuffer.

public static ByteBuffer

Returns:

A ByteBuffer representing the mapped buffer memory.
glMapBufferOES
(int target, int access, long length, ByteBuffer
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.

old_buffer
)

glMapBufferOES maps a GL buffer object to a ByteBuffer.

public static boolean
glUnmapBufferOES(int target)

pack-priv static native void
pack-priv static native ByteBuffer
nglGetBufferPointervOES(int target, int pname, long result_size, ByteBuffer old_buffer)

pack-priv static native ByteBuffer
nglMapBufferOES(int target, int access, long result_size, ByteBuffer old_buffer)

pack-priv static native boolean
nglUnmapBufferOES(int target)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

GL_BUFFER_ACCESS_OESback to summary
public static final int GL_BUFFER_ACCESS_OES

Accepted by the <value> parameter of GetBufferParameteriv:

GL_BUFFER_MAP_POINTER_OESback to summary
public static final int GL_BUFFER_MAP_POINTER_OES

Accepted by the <pname> parameter of GetBufferPointervOES:

GL_BUFFER_MAPPED_OESback to summary
public static final int GL_BUFFER_MAPPED_OES

Accepted by the <value> parameter of GetBufferParameteriv:

GL_WRITE_ONLY_OESback to summary
public static final int GL_WRITE_ONLY_OES

Accepted by the <access> parameter of MapBufferOES:

Constructor Detail

OESMapbufferback to summary
private OESMapbuffer()

Method Detail

glGetBufferPointerOESback to summary
public static ByteBuffer glGetBufferPointerOES(int target, int pname, ByteBuffer old_buffer)
glGetBufferPointervOESback to summary
public static ByteBuffer glGetBufferPointervOES(int target, int pname, long length, ByteBuffer old_buffer)
glMapBufferOESback to summary
public static ByteBuffer glMapBufferOES(int target, int access, ByteBuffer old_buffer)

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:ByteBuffer

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:ByteBuffer

A ByteBuffer representing the mapped buffer memory.

glMapBufferOESback to summary
public static ByteBuffer glMapBufferOES(int target, int access, long length, ByteBuffer old_buffer)

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:ByteBuffer

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:ByteBuffer

A ByteBuffer representing the mapped buffer memory.

glUnmapBufferOESback to summary
public static boolean glUnmapBufferOES(int target)
initNativeStubsback to summary
pack-priv static native void initNativeStubs() throws LWJGLException
nglGetBufferPointervOESback to summary
pack-priv static native ByteBuffer nglGetBufferPointervOES(int target, int pname, long result_size, ByteBuffer old_buffer)
nglMapBufferOESback to summary
pack-priv static native ByteBuffer nglMapBufferOES(int target, int access, long result_size, ByteBuffer old_buffer)
nglUnmapBufferOESback to summary
pack-priv static native boolean nglUnmapBufferOES(int target)