Package org.lwjgl.opengl

# Class GL15

java.lang.Object
org.lwjgl.opengl.GL15

public final class GL15 extends Object

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`GL_ARRAY_BUFFER`
`static final int`
`GL_ARRAY_BUFFER_BINDING`
`static final int`
`GL_BUFFER_ACCESS`
`static final int`
`GL_BUFFER_MAP_POINTER`
`static final int`
`GL_BUFFER_MAPPED`
`static final int`
`GL_BUFFER_SIZE`
`static final int`
`GL_BUFFER_USAGE`
`static final int`
`GL_COLOR_ARRAY_BUFFER_BINDING`
`static final int`
`GL_CURRENT_FOG_COORD`
`static final int`
`GL_CURRENT_QUERY`
Accepted by the <pname> parameter of GetQueryiv:
`static final int`
`GL_DYNAMIC_COPY`
`static final int`
`GL_DYNAMIC_DRAW`
`static final int`
`GL_DYNAMIC_READ`
`static final int`
`GL_EDGE_FLAG_ARRAY_BUFFER_BINDING`
`static final int`
`GL_ELEMENT_ARRAY_BUFFER`
`static final int`
`GL_ELEMENT_ARRAY_BUFFER_BINDING`
`static final int`
`GL_FOG_COORD`
`static final int`
`GL_FOG_COORD_ARRAY`
`static final int`
`GL_FOG_COORD_ARRAY_BUFFER_BINDING`
`static final int`
`GL_FOG_COORD_ARRAY_POINTER`
`static final int`
`GL_FOG_COORD_ARRAY_STRIDE`
`static final int`
`GL_FOG_COORD_ARRAY_TYPE`
`static final int`
`GL_FOG_COORD_SRC`
`static final int`
`GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING`
`static final int`
`GL_INDEX_ARRAY_BUFFER_BINDING`
`static final int`
`GL_NORMAL_ARRAY_BUFFER_BINDING`
`static final int`
`GL_QUERY_COUNTER_BITS`
Accepted by the <pname> parameter of GetQueryiv:
`static final int`
`GL_QUERY_RESULT`
Accepted by the <pname> parameter of GetQueryObjectiv and GetQueryObjectuiv:
`static final int`
`GL_QUERY_RESULT_AVAILABLE`
Accepted by the <pname> parameter of GetQueryObjectiv and GetQueryObjectuiv:
`static final int`
`GL_READ_ONLY`
`static final int`
`GL_READ_WRITE`
`static final int`
`GL_SAMPLES_PASSED`
Accepted by the <target> parameter of BeginQuery, EndQuery, and GetQueryiv:
`static final int`
`GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING`
`static final int`
`GL_SRC0_ALPHA`
`static final int`
`GL_SRC0_RGB`
`static final int`
`GL_SRC1_ALPHA`
`static final int`
`GL_SRC1_RGB`
`static final int`
`GL_SRC2_ALPHA`
`static final int`
`GL_SRC2_RGB`
`static final int`
`GL_STATIC_COPY`
`static final int`
`GL_STATIC_DRAW`
`static final int`
`GL_STATIC_READ`
`static final int`
`GL_STREAM_COPY`
`static final int`
`GL_STREAM_DRAW`
`static final int`
`GL_STREAM_READ`
`static final int`
`GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING`
`static final int`
`GL_VERTEX_ARRAY_BUFFER_BINDING`
`static final int`
`GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING`
`static final int`
`GL_WEIGHT_ARRAY_BUFFER_BINDING`
`static final int`
`GL_WRITE_ONLY`

## Method Summary

Modifier and Type
Method
Description
`static void`
`glBeginQuery(int target, int id)`
`static void`
`glBindBuffer(int target, int buffer)`
`static void`
`glBufferData(int target, long data_size, int usage)`
`static void`
`glBufferData(int target, ByteBuffer data, int usage)`
`static void`
`glBufferData(int target, DoubleBuffer data, int usage)`
`static void`
`glBufferData(int target, FloatBuffer data, int usage)`
`static void`
`glBufferData(int target, IntBuffer data, int usage)`
`static void`
`glBufferData(int target, ShortBuffer data, int usage)`
`static void`
`glBufferSubData(int target, long offset, ByteBuffer data)`
`static void`
`glBufferSubData(int target, long offset, DoubleBuffer data)`
`static void`
`glBufferSubData(int target, long offset, FloatBuffer data)`
`static void`
`glBufferSubData(int target, long offset, IntBuffer data)`
`static void`
`glBufferSubData(int target, long offset, ShortBuffer data)`
`static void`
`glDeleteBuffers(int buffer)`
Overloads glDeleteBuffers.
`static void`
`glDeleteBuffers(IntBuffer buffers)`
`static void`
`glDeleteQueries(int id)`
Overloads glDeleteQueries.
`static void`
`glDeleteQueries(IntBuffer ids)`
`static void`
`glEndQuery(int target)`
`static int`
`glGenBuffers()`
Overloads glGenBuffers.
`static void`
`glGenBuffers(IntBuffer buffers)`
`static int`
`glGenQueries()`
Overloads glGenQueries.
`static void`
`glGenQueries(IntBuffer ids)`
`static int`
`glGetBufferParameter(int target, int pname)`
Deprecated.
Will be removed in 3.0.
`static void`
`glGetBufferParameter(int target, int pname, IntBuffer params)`
`static int`
`glGetBufferParameteri(int target, int pname)`
Overloads glGetBufferParameteriv.
`static ByteBuffer`
`glGetBufferPointer(int target, int pname)`
`static void`
`glGetBufferSubData(int target, long offset, ByteBuffer data)`
`static void`
`glGetBufferSubData(int target, long offset, DoubleBuffer data)`
`static void`
`glGetBufferSubData(int target, long offset, FloatBuffer data)`
`static void`
`glGetBufferSubData(int target, long offset, IntBuffer data)`
`static void`
`glGetBufferSubData(int target, long offset, ShortBuffer data)`
`static int`
`glGetQuery(int target, int pname)`
Deprecated.
Will be removed in 3.0.
`static void`
`glGetQuery(int target, int pname, IntBuffer params)`
`static int`
`glGetQueryi(int target, int pname)`
Overloads glGetQueryiv.
`static void`
`glGetQueryObject(int id, int pname, IntBuffer params)`
`static int`
`glGetQueryObjecti(int id, int pname)`
Overloads glGetQueryObjectiv.
`static void`
`glGetQueryObjectu(int id, int pname, IntBuffer params)`
`static int`
`glGetQueryObjectui(int id, int pname)`
Overloads glGetQueryObjectuiv.
`static boolean`
`glIsBuffer(int buffer)`
`static boolean`
`glIsQuery(int id)`
`static ByteBuffer`
`glMapBuffer(int target, int access, long length, ByteBuffer old_buffer)`
glMapBuffer maps a GL buffer object to a ByteBuffer.
`static ByteBuffer`
`glMapBuffer(int target, int access, ByteBuffer old_buffer)`
glMapBuffer maps a GL buffer object to a ByteBuffer.
`static boolean`
`glUnmapBuffer(int target)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### GL_ARRAY_BUFFER

public static final int GL_ARRAY_BUFFER

See Also:
  - Constant Field Values

### GL_ELEMENT_ARRAY_BUFFER

public static final int GL_ELEMENT_ARRAY_BUFFER

See Also:
  - Constant Field Values

### GL_ARRAY_BUFFER_BINDING

public static final int GL_ARRAY_BUFFER_BINDING

See Also:
  - Constant Field Values

### GL_ELEMENT_ARRAY_BUFFER_BINDING

public static final int GL_ELEMENT_ARRAY_BUFFER_BINDING

See Also:
  - Constant Field Values

### GL_VERTEX_ARRAY_BUFFER_BINDING

public static final int GL_VERTEX_ARRAY_BUFFER_BINDING

See Also:
  - Constant Field Values

### GL_NORMAL_ARRAY_BUFFER_BINDING

public static final int GL_NORMAL_ARRAY_BUFFER_BINDING

See Also:
  - Constant Field Values

### GL_COLOR_ARRAY_BUFFER_BINDING

public static final int GL_COLOR_ARRAY_BUFFER_BINDING

See Also:
  - Constant Field Values

### GL_INDEX_ARRAY_BUFFER_BINDING

public static final int GL_INDEX_ARRAY_BUFFER_BINDING

See Also:
  - Constant Field Values

### GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING

public static final int GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING

See Also:
  - Constant Field Values

### GL_EDGE_FLAG_ARRAY_BUFFER_BINDING

public static final int GL_EDGE_FLAG_ARRAY_BUFFER_BINDING

See Also:
  - Constant Field Values

### GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING

public static final int GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING

See Also:
  - Constant Field Values

### GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING

public static final int GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING

See Also:
  - Constant Field Values

### GL_WEIGHT_ARRAY_BUFFER_BINDING

public static final int GL_WEIGHT_ARRAY_BUFFER_BINDING

See Also:
  - Constant Field Values

### GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING

public static final int GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING

See Also:
  - Constant Field Values

### GL_STREAM_DRAW

public static final int GL_STREAM_DRAW

See Also:
  - Constant Field Values

### GL_STREAM_READ

public static final int GL_STREAM_READ

See Also:
  - Constant Field Values

### GL_STREAM_COPY

public static final int GL_STREAM_COPY

See Also:
  - Constant Field Values

### GL_STATIC_DRAW

public static final int GL_STATIC_DRAW

See Also:
  - Constant Field Values

### GL_STATIC_READ

public static final int GL_STATIC_READ

See Also:
  - Constant Field Values

### GL_STATIC_COPY

public static final int GL_STATIC_COPY

See Also:
  - Constant Field Values

### GL_DYNAMIC_DRAW

public static final int GL_DYNAMIC_DRAW

See Also:
  - Constant Field Values

### GL_DYNAMIC_READ

public static final int GL_DYNAMIC_READ

See Also:
  - Constant Field Values

### GL_DYNAMIC_COPY

public static final int GL_DYNAMIC_COPY

See Also:
  - Constant Field Values

### GL_READ_ONLY

public static final int GL_READ_ONLY

See Also:
  - Constant Field Values

### GL_WRITE_ONLY

public static final int GL_WRITE_ONLY

See Also:
  - Constant Field Values

### GL_READ_WRITE

public static final int GL_READ_WRITE

See Also:
  - Constant Field Values

### GL_BUFFER_SIZE

public static final int GL_BUFFER_SIZE

See Also:
  - Constant Field Values

### GL_BUFFER_USAGE

public static final int GL_BUFFER_USAGE

See Also:
  - Constant Field Values

### GL_BUFFER_ACCESS

public static final int GL_BUFFER_ACCESS

See Also:
  - Constant Field Values

### GL_BUFFER_MAPPED

public static final int GL_BUFFER_MAPPED

See Also:
  - Constant Field Values

### GL_BUFFER_MAP_POINTER

public static final int GL_BUFFER_MAP_POINTER

See Also:
  - Constant Field Values

### GL_FOG_COORD_SRC

public static final int GL_FOG_COORD_SRC

See Also:
  - Constant Field Values

### GL_FOG_COORD

public static final int GL_FOG_COORD

See Also:
  - Constant Field Values

### GL_CURRENT_FOG_COORD

public static final int GL_CURRENT_FOG_COORD

See Also:
  - Constant Field Values

### GL_FOG_COORD_ARRAY_TYPE

public static final int GL_FOG_COORD_ARRAY_TYPE

See Also:
  - Constant Field Values

### GL_FOG_COORD_ARRAY_STRIDE

public static final int GL_FOG_COORD_ARRAY_STRIDE

See Also:
  - Constant Field Values

### GL_FOG_COORD_ARRAY_POINTER

public static final int GL_FOG_COORD_ARRAY_POINTER

See Also:
  - Constant Field Values

### GL_FOG_COORD_ARRAY

public static final int GL_FOG_COORD_ARRAY

See Also:
  - Constant Field Values

### GL_FOG_COORD_ARRAY_BUFFER_BINDING

public static final int GL_FOG_COORD_ARRAY_BUFFER_BINDING

See Also:
  - Constant Field Values

### GL_SRC0_RGB

public static final int GL_SRC0_RGB

See Also:
  - Constant Field Values

### GL_SRC1_RGB

public static final int GL_SRC1_RGB

See Also:
  - Constant Field Values

### GL_SRC2_RGB

public static final int GL_SRC2_RGB

See Also:
  - Constant Field Values

### GL_SRC0_ALPHA

public static final int GL_SRC0_ALPHA

See Also:
  - Constant Field Values

### GL_SRC1_ALPHA

public static final int GL_SRC1_ALPHA

See Also:
  - Constant Field Values

### GL_SRC2_ALPHA

public static final int GL_SRC2_ALPHA

See Also:
  - Constant Field Values

### GL_SAMPLES_PASSED

public static final int GL_SAMPLES_PASSED
Accepted by the <target> parameter of BeginQuery, EndQuery, and GetQueryiv:

See Also:
  - Constant Field Values

### GL_QUERY_COUNTER_BITS

public static final int GL_QUERY_COUNTER_BITS
Accepted by the <pname> parameter of GetQueryiv:

See Also:
  - Constant Field Values

### GL_CURRENT_QUERY

public static final int GL_CURRENT_QUERY
Accepted by the <pname> parameter of GetQueryiv:

See Also:
  - Constant Field Values

### GL_QUERY_RESULT

public static final int GL_QUERY_RESULT
Accepted by the <pname> parameter of GetQueryObjectiv and GetQueryObjectuiv:

See Also:
  - Constant Field Values

### GL_QUERY_RESULT_AVAILABLE

public static final int GL_QUERY_RESULT_AVAILABLE
Accepted by the <pname> parameter of GetQueryObjectiv and GetQueryObjectuiv:

See Also:
  - Constant Field Values

## Method Details

### glBindBuffer

public static void glBindBuffer(int target, int buffer)

### glDeleteBuffers

public static void glDeleteBuffers(IntBuffer buffers)

### glDeleteBuffers

public static void glDeleteBuffers(int buffer)
Overloads glDeleteBuffers.

### glGenBuffers

public static void glGenBuffers(IntBuffer buffers)

### glGenBuffers

public static int glGenBuffers()
Overloads glGenBuffers.

### glIsBuffer

public static boolean glIsBuffer(int buffer)

### glBufferData

public static void glBufferData(int target, long data_size, int usage)

### glBufferData

public static void glBufferData(int target, ByteBuffer data, int usage)

### glBufferData

public static void glBufferData(int target, DoubleBuffer data, int usage)

### glBufferData

public static void glBufferData(int target, FloatBuffer data, int usage)

### glBufferData

public static void glBufferData(int target, IntBuffer data, int usage)

### glBufferData

public static void glBufferData(int target, ShortBuffer data, int usage)

### glBufferSubData

public static void glBufferSubData(int target, long offset, ByteBuffer data)

### glBufferSubData

public static void glBufferSubData(int target, long offset, DoubleBuffer data)

### glBufferSubData

public static void glBufferSubData(int target, long offset, FloatBuffer data)

### glBufferSubData

public static void glBufferSubData(int target, long offset, IntBuffer data)

### glBufferSubData

public static void glBufferSubData(int target, long offset, ShortBuffer data)

### glGetBufferSubData

public static void glGetBufferSubData(int target, long offset, ByteBuffer data)

### glGetBufferSubData

public static void glGetBufferSubData(int target, long offset, DoubleBuffer data)

### glGetBufferSubData

public static void glGetBufferSubData(int target, long offset, FloatBuffer data)

### glGetBufferSubData

public static void glGetBufferSubData(int target, long offset, IntBuffer data)

### glGetBufferSubData

public static void glGetBufferSubData(int target, long offset, ShortBuffer data)

### glMapBuffer

public static ByteBuffer glMapBuffer(int target, int access, ByteBuffer old_buffer)
glMapBuffer 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 = glMapBuffer(..., ..., null); ... // Another map on the same buffer mapped_buffer = glMapBuffer(..., ..., 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.

### glMapBuffer

public static ByteBuffer glMapBuffer(int target, int access, long length, ByteBuffer old_buffer)
glMapBuffer 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 = glMapBuffer(..., ..., null); ... // Another map on the same buffer mapped_buffer = glMapBuffer(..., ..., 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.

### glUnmapBuffer

public static boolean glUnmapBuffer(int target)

### glGetBufferParameter

public static void glGetBufferParameter(int target, int pname, IntBuffer params)

### glGetBufferParameter

@Deprecated public static int glGetBufferParameter(int target, int pname)
Deprecated.
Will be removed in 3.0. Use `glGetBufferParameteri(int, int)` instead.
Overloads glGetBufferParameteriv.

### glGetBufferParameteri

public static int glGetBufferParameteri(int target, int pname)
Overloads glGetBufferParameteriv.

### glGetBufferPointer

public static ByteBuffer glGetBufferPointer(int target, int pname)

### glGenQueries

public static void glGenQueries(IntBuffer ids)

### glGenQueries

public static int glGenQueries()
Overloads glGenQueries.

### glDeleteQueries

public static void glDeleteQueries(IntBuffer ids)

### glDeleteQueries

public static void glDeleteQueries(int id)
Overloads glDeleteQueries.

### glIsQuery

public static boolean glIsQuery(int id)

### glBeginQuery

public static void glBeginQuery(int target, int id)

### glEndQuery

public static void glEndQuery(int target)

### glGetQuery

public static void glGetQuery(int target, int pname, IntBuffer params)

### glGetQuery

@Deprecated public static int glGetQuery(int target, int pname)
Deprecated.
Will be removed in 3.0. Use `glGetQueryi(int, int)` instead.
Overloads glGetQueryiv.

### glGetQueryi

public static int glGetQueryi(int target, int pname)
Overloads glGetQueryiv.

### glGetQueryObject

public static void glGetQueryObject(int id, int pname, IntBuffer params)

### glGetQueryObjecti

public static int glGetQueryObjecti(int id, int pname)
Overloads glGetQueryObjectiv.

### glGetQueryObjectu

public static void glGetQueryObjectu(int id, int pname, IntBuffer params)

### glGetQueryObjectui

public static int glGetQueryObjectui(int id, int pname)
Overloads glGetQueryObjectuiv.