www.khronos.org/opengles©2015 Khronos Group - Rev. 0715
OpenGL ES 3.2 API Reference Guide Page 3
Patches and Verces
Separate Patches [10.1.12]
Specify the xed number of verces in each
patch in the series.
void PatchParameteri(enum pname,
int value);
pname: must be PATCH_VERTICES
Current Vertex Aribute Values [10.2.1]
Specify generic aributes with components
of type oat (VertexArib*), int, or uint
(VertexAribI*).
void VertexArib{1234}{f}(uint index,
oat values);
void VertexArib{1234}fv(uint index,
const oat *values);
void VertexArib
I4{i ui}(uint index,
T values);
void VertexArib
I4{i ui}v(uint index,
const T *values);
Vertex Arrays
Generic Vertex Aributes [10.3.1]
void VertexAribFormat(uint aribindex,
int size, enum type, boolean normalized,
unit relaveoset);
type: FIXED,
[UNSIGNED_]BYTE,
[UNSIGNED_]INT, [HALF_]FLOAT,
[UNSIGNED_]INT_2_10_10_10_REV,
[UNSIGNED_]SHORT
void VertexAribIFormat(uint aribindex,
int size, enum type, unit relaveoset);
type: See VertexAribFormat
void BindVertexBuer(uint bindingindex,
uint buer, intptr oset, sizei stride);
void VertexAribBinding(uint aribindex,
uint bindingindex);
void VertexAribPointer(uint index, int size,
enum type, boolean normalized,
sizei stride, const void *pointer);
type: See VertexAribFormat
void VertexAribIPointer(uint index,
int size, enum type, sizei stride,
const void *pointer);
type: See VertexAribIFormat
index: [0, MAX_VERTEX_ATTRIBS - 1]
void EnableVertexAribArray(uint index);
void DisableVertexAribArray(uint index);
Vertex Aribute Divisors [10.3.2]
void VertexBindingDivisor(uint bindingindex,
uint divisor);
void VertexAribDivisor(uint index,
uint divisor);
Primive Restart [10.3.4]
Enable/Disable/IsEnabled(target);
target: PRIMITIVE_RESTART_FIXED_INDEX
Vertex Array Objects [10.4]
All states related to denion of data used by
vertex processor is in a vertex array object.
void GenVertexArrays(sizei n, uint *arrays);
void DeleteVertexArrays(sizei n,
const uint *arrays);
void BindVertexArray(uint array);
boolean IsVertexArray(uint array);
Drawing Commands [10.5]
For all the funcons in this secon:
mode:
LINE_LOOP, LINE_[STRIP_]ADJACENCY,
LINES, LINES_ADJACENCY,
PATCHES TRIANGLE_FAN,
POINTS[_TRIANGLES_ADJACENCY],
TRIANGLES, TRIANGLE_STRIP[_ADJACENCY]
type: UNSIGNED_{BYTE, SHORT, INT}
void DrawArrays(enum mode, int rst,
sizei count);
void DrawArraysInstanced(
enum mode, int rst, sizei count,
sizei instancecount);
void DrawArraysIndirect(enum mode,
const void *indirect);
void DrawElements(enum mode, sizei count,
enum type, const void *indices);
void DrawElementsInstanced(enum mode,
sizei count, enum type, const void *indices,
sizei instancecount);
void DrawRangeElements(enum mode,
uint start, uint end, sizei count,
enum type, const void *indices);
void DrawElementsBaseVertex(enum mode,
sizei count, enum type, const void *indices,
int basevertex);
void DrawRangeElementsBaseVertex(
enum mode, uint start, uint end,
sizei count, enum type, const void *indices,
int basevertex);
void
DrawElementsInstancedBaseVertex(
enum mode, sizei count,
enum type, const void *indices,
sizei instancecount, int basevertex);
void DrawElementsIndirect(enum mode,
enum type, const void *indirect);
Vertex Array Queries [10.6]
void GetVertexArib{f i}v(uint index,
enum pname, T *params);
pname: CURRENT_VERTEX_ATTRIB,
VERTEX_ATTRIB_[BUFFER_]BINDING,
VERTEX_ATTRIB_RELATIVE_OFFSET,
or VERTEX_ATTRIB_ARRAY_X, where X may be
one of DIVISOR, ENABLED, INTEGER,
NORMALIZED, SIZE, STRIDE, TYPE
void GetVertexAribI{i ui}v(uint index,
enum pname, T *params);
pname: See GetVertexArib{f i}v
void GetVertexAribPointerv(uint index,
enum pname, const void **pointer);
pname: VERTEX_ATTRIB_ARRAY_POINTER
Framebuer Objects
Binding and Managing [9.2]
void BindFramebuer(enum target,
uint framebuer);
target: [DRAW_, READ_]FRAMEBUFFER
void GenFramebuers(sizei n,
uint * framebuers);
void DeleteFramebuers(sizei n,
const uint * framebuers);
boolean IsFramebuer(uint framebuer);
Framebuer Object Parameters [9.2.1]
void FramebuerParameteri(
enum target, enum pname, int param);
target: [DRAW_, READ_]FRAMEBUFFER
pname: FRAMEBUFFER_DEFAULT_X where X may
be one of FIXED_SAMPLE_LOCATIONS, HEIGHT,
LAYERS, SAMPLES, WIDTH
Framebuer Object Queries [9.2.3]
void GetFramebuerParameteriv(
enum target, enum pname, int *params);
target: [DRAW_, READ_]FRAMEBUFFER
pname: See FramebuerParameteri
void GetFramebuerAachmentParameteriv(
enum target, enum aachment,
enum pname, int *params);
target: [DRAW_, READ_]FRAMEBUFFER
aachment:
BACK, COLOR_ATTACHMENTi, DEPTH, STENCIL,
{DEPTH, STENCIL, DEPTH_STENCIL}_ATTACHMENT
pname:
FRAMEBUFFER_ATTACHMENT_X, where X may be
OBJECT_{NAME, TYPE}, COLOR_ENCODING,
COMPONENT_TYPE, {RED, GREEN, BLUE}_SIZE,
{ALPHA, DEPTH, STENCIL}_SIZE, LAYERED,
TEXTURE_{LAYER, LEVEL, CUBE_MAP_FACE}
Renderbuer Objects [9.2.4]
void BindRenderbuer(enum target,
uint renderbuer);
target: must be RENDERBUFFER
void GenRenderbuers(sizei n,
uint *renderbuers);
void DeleteRenderbuers(sizei n,
const uint *renderbuers);
boolean IsRenderbuer(uint renderbuer);
void RenderbuerStorageMulsample(
enum target, sizei samples,
enum internalformat, sizei width,
sizei height);
target: must be RENDERBUFFER
internalformat: See sizedinternalformat for
TexStorage2DMulsample
void RenderbuerStorage(enum target,
enum internalformat, sizei width,
sizei height);
target: must be RENDERBUFFER
internalformat: See TexStorage2DMulsample
Renderbuer Object Queries [9.2.6]
void GetRenderbuerParameteriv(
enum target, enum pname, int *params);
target: must be RENDERBUFFER
pname: [Table 20.16]
RENDERBUFFER_X, where X may be one of
HEIGHT, INTERNAL_FORMAT, SAMPLES, WIDTH,
Y_SIZE, where Y may be one of ALPHA, RED,
GREEN, BLUE, DEPTH, STENCIL
Aaching Renderbuer Images [9.2.7]
void FramebuerRenderbuer(
enum target, enum aachment,
enum renderbuertarget,
uint renderbuer);
target: [DRAW_, READ_]FRAMEBUFFER
aachment: [Table 9.1]
{DEPTH, STENCIL, DEPTH_STENCIL}_ATTACHMENT,
COLOR_ATTACHMENTi where i is
[0, MAX_COLOR_ATTACHMENTS - 1]
renderbuertarget: RENDERBUFFER if renderbuer
is non-zero, else undened
Aaching Texture Images [9.2.8]
void FramebuerTexture(enum target,
enum aachment, uint texture, int level);
target, aachment: See FramebuerRenderbuer
void FramebuerTexture2D(enum target,
enum aachment, enum textarget,
uint texture, int level);
textarget:
TEXTURE_CUBE_MAP_POSITIVE_{X, Y, Z},
TEXTURE_CUBE_MAP_NEGATIVE_{X, Y, Z},
TEXTURE_{2D, 2D_MULTISAMPLE} if texture is
zero, else undened
target, aachment: See FramebuerRenderbuer
void FramebuerTextureLayer(enum target,
enum aachment, uint texture,
int level, int layer);
target, aachment: See FramebuerRenderbuer
Framebuer Completeness [9.4.2]
enum CheckFramebuerStatus(enum target);
target: [DRAW_, READ_]FRAMEBUFFER
returns: FRAMEBUFFER_COMPLETE or a constant
indicang the violang value
Vertex Aributes [11.1]
Vertex shaders operate on array of 4-component
items numbered from slot 0 to
MAX_VERTEX_ATTRIBS - 1.
void BindAribLocaon(uint program,
uint index, const char *name);
void GetAcveArib(uint program, uint index,
sizei bufSize
, sizei *length, int *size,
enum *type, char *name);
int GetAribLocaon(uint program,
const char *name);
Vertex Shader Variables [11.1.2]
void TransformFeedbackVaryings(
uint program, sizei count,
const char * const *varyings,
enum buerMode);
buerMode: {INTERLEAVED, SEPARATE}_ATTRIBS
void GetTransformFeedbackVarying(
uint program, uint index, sizei bufSize,
sizei *length, sizei *size, enum *type,
char *name);
*type returns
NONE,
BOOL, BOOL_{VEC2, VEC3, VEC4},
FLOAT[_VECn], FLOAT_MATnxm, FLOAT_MATn,
[UNSIGNED_]INT, [UNSIGNED_]INT_VECn,
Shader Validaon [11.1.3.11]
void ValidateProgram (uint program);
void ValidateProgramPipeline(uint pipeline);
Textures, Samplers (cont.)
Texture Queries [8.11]
void GetTexParameter{i f}v(enum target,
enum pname, T * params);
target: TEXTURE_{2D, 3D},
TEXTURE_2D_{ARRAY, MULTISAMPLE}
TEXTURE_2D_MULTISAMPLE_ARRAY,
TEXTURE_CUBE_MAP[_ARRAY]
pname:
See TexParameter{i f}v, plus
IMAGE_FORMAT_COMPATIBILITY_TYPE,
TEXTURE_IMMUTABLE_{FORMAT, LEVELS}
void GetTexParameterI{i ui}v(enum target,
enum pname, T * params);
target: See GetTexParameter{i f}v
void GetTexLevelParameter{i f}v(enum target,
int level, enum pname, T *params);
target: TEXTURE_2D[_MULTISAMPLE],
TEXTURE_{2D, CUBE_MAP}_ARRAY,
TEXTURE_2D_MULTISAMPLE_ARRAY,,
TEXTURE_BUFFER, TEXTURE_3D
TEXTURE_CUBE_MAP_POSITIVE_{X, Y, Z},
TEXTURE_CUBE_MAP_NEGATIVE_{X, Y, Z}
pname: [Table 21.11] TEXTURE_Y, where Y may be
one of BUFFER_DATA_STORE_BINDING,
BUFFER_{OFFSET, SIZE}, COMPRESSED,
DEPTH, HEIGHT, INTERNAL_FORMAT,
FIXED_SAMPLE_LOCATIONS, SAMPLES,
SHARED_SIZE, STENCIL_SIZE, WIDTH;
or X_{SIZE, TYPE}, where X may be one of ALPHA,
RED, GREEN, BLUE, DEPTH
Manual Mipmap Generaon [8.14.4]
void GenerateMipmap(enum target);
target:
TEXTURE_{2D, 3D, 2D_ARRAY, CUBE_MAP},
TEXTURE_CUBE_MAP_ARRAY
Immutable-Format Tex. Images [8.18]
void TexStorage2D(enum target, sizei levels,
enum internalformat, sizei width,
sizei height);
target: TEXTURE_2D, TEXTURE_CUBE_MAP
internalformat: See TexImage3D
void TexStorage3D(enum target, sizei levels,
enum internalformat, sizei width,
sizei height, sizei depth);
target: TEXTURE_2D_ARRAY, TEXTURE_3D,
TEXTURE_CUBE_MAP_ARRAY
internalformat: See TexImage3D
Texture Image Loads/Stores [8.22]
void BindImageTexture(uint unit,
uint texture, int level, boolean layered,
int layer, enum access, enum format);
access: READ_ONLY, READ_WRITE, WRITE_ONLY
format: [Table 8.27]
R32{I, F, UI}, RGBA32{I, F, UI}, RGBA16{I, F, UI},
RGBA8 , RGBA8{I, UI}, RGBA8_SNORM