public final class WebGL10
extends java.lang.Object
This class contains all the constants and methods that were introduced in the WebGL 1.0 specification. The methods
require a WebGL 1.0 compatible context current (see WebGLContext) and the canvas of the active context
visible on the webpage. The extensions that require WebGL 1.0 specification are
ANGLE_instanced_arraysEXT_blend_minmaxEXT_frag_depthEXT_shader_texture_lodEXT_texture_filter_anisotropicOES_element_index_uintOES_standard_derivativesOES_texture_floatOES_texture_float_linearOES_texture_half_floatOES_texture_half_float_linearOES_vertex_array_objectWEBGL_compressed_texture_s3tcWEBGL_debug_renderer_infoWEBGL_debug_shadersWEBGL_depth_textureWEBGL_draw_buffersWEBGL_lose_contextThe specification that describes the WebGL 1.0 API can be found here at the Khronos registry at the following URL: https://www.khronos.org/registry/webgl/specs/latest/1.0/
| Modifier and Type | Class and Description |
|---|---|
static class |
WebGL10.ActiveInfo
The WebGL10.ActiveInfo class represents the information returned from the
glGetActiveAttrib(int, int)
and glGetActiveUniform(int, int) calls. |
static class |
WebGL10.ShaderPrecisionFormat
The WebGL10.ShaderPrecisionFormat class represents the information returned from the
glGetShaderPrecisionFormat(int, int) call. |
| Modifier and Type | Method and Description |
|---|---|
static WebGLContext |
createContext(com.google.gwt.canvas.client.Canvas canvas)
Creates a WebGL 1.0 context upon a canvas object using the default context attributes.
|
static WebGLContext |
createContext(com.google.gwt.dom.client.CanvasElement canvas)
Creates a WebGL 1.0 context upon a canvas element using the default context attributes.
|
static WebGLContext |
createContext(com.google.gwt.dom.client.CanvasElement canvas,
WebGLContext.Attributes attributes)
Creates a WebGL 1.0 context upon a canvas element using the specified context attributes.
|
static WebGLContext |
createContext(com.google.gwt.canvas.client.Canvas canvas,
WebGLContext.Attributes attributes)
Creates a WebGL 1.0 context upon a canvas object using the specified context attributes.
|
static void |
glActiveTexture(int texture)
glActiveTexture selects which texture unit subsequent texture state calls will affect. |
static void |
glAttachShader(int programID,
int shaderID)
glAttachShader attaches the shader object specified by shaderID to the program object
specified by programID. |
static void |
glBindAttribLocation(int programID,
int index,
java.lang.String name)
glBindAttribLocation is used to associate a user-defined attribute variable in the program object
specified by programID with a generic vertex attribute index. |
static void |
glBindBuffer(int target,
int buffer)
glBindBuffer binds a buffer object to the specified buffer binding point. |
static void |
glBindFramebuffer(int target,
int frameBuffer)
glBindFramebuffer binds the framebuffer object with name framebuffer to the framebuffer target
specified by target. |
static void |
glBindRenderbuffer(int target,
int renderBuffer)
glBindRenderbuffer binds the renderbuffer object with name renderbuffer to the renderbuffer target
specified by target. |
static void |
glBindTexture(int target,
int textureID)
glBindTexture lets you create or use a named texture. |
static void |
glBlendColor(float r,
float g,
float b,
float a)
The
GL_BLEND_COLOR may be used to calculate the source and destination blending factors. |
static void |
glBlendEquation(int mode)
The blend equations determine how a new pixel (the ''source'' color) is combined with a pixel already in the
framebuffer (the ''destination'' color).
|
static void |
glBlendEquationSeparate(int modeRGB,
int modeAlpha)
The blend equations determines how a new pixel (the ''source'' color) is combined with a pixel already in the
framebuffer (the ''destination'' color).
|
static void |
glBlendFunc(int srcFactor,
int dstFactor)
glBlendFunc defines the operation of blending when it is enabled. |
static void |
glBlendFuncSeparate(int srcRGB,
int dstRGB,
int srcAlpha,
int dstAlpha)
glBlendFuncSeparate defines the operation of blending when it is enabled. |
static void |
glBufferData(int target,
com.google.gwt.typedarrays.shared.ArrayBufferView data,
int usage)
glBufferData creates a new data store for the buffer object currently bound to target. |
static void |
glBufferData(int target,
float[] data,
int usage)
glBufferData creates a new data store for the buffer object currently bound to target. |
static void |
glBufferData(int target,
int[] data,
int usage)
glBufferData creates a new data store for the buffer object currently bound to target. |
static void |
glBufferData(int target,
int size,
int usage)
glBufferData creates a new data store for the buffer object currently bound to target. |
static void |
glBufferData(int target,
short[] data,
int usage)
glBufferData creates a new data store for the buffer object currently bound to target. |
static void |
glBufferSubData(int target,
int offset,
com.google.gwt.typedarrays.shared.ArrayBufferView data)
glBufferSubData redefines some or all of the data store for the buffer object currently bound to
target. |
static void |
glBufferSubData(int target,
int offset,
byte[] data)
glBufferSubData redefines some or all of the data store for the buffer object currently bound to
target. |
static void |
glBufferSubData(int target,
int offset,
float[] data)
glBufferSubData redefines some or all of the data store for the buffer object currently bound to
target. |
static void |
glBufferSubData(int target,
int offset,
int[] data)
glBufferSubData redefines some or all of the data store for the buffer object currently bound to
target. |
static void |
glBufferSubData(int target,
int offset,
int size,
com.google.gwt.typedarrays.shared.ArrayBufferView data)
glBufferSubData redefines some or all of the data store for the buffer object currently bound to
target. |
static void |
glBufferSubData(int target,
int offset,
int size,
float[] data)
glBufferSubData redefines some or all of the data store for the buffer object currently bound to
target. |
static void |
glBufferSubData(int target,
int offset,
int size,
int[] data)
glBufferSubData redefines some or all of the data store for the buffer object currently bound to
target. |
static void |
glBufferSubData(int target,
int offset,
int size,
short[] data)
glBufferSubData redefines some or all of the data store for the buffer object currently bound to
target. |
static void |
glBufferSubData(int target,
int offset,
short[] data)
glBufferSubData redefines some or all of the data store for the buffer object currently bound to
target. |
static int |
glCheckFramebufferStatus(int target)
glCheckFramebufferStatus returns a symbolic constant that identifies whether or not the currently
bound framebuffer is framebuffer complete, and if not, which of the rules of framebuffer completeness is
violated. |
static void |
glClear(int masks)
glClear sets the bitplane area of the window to values previously selected by glClearColor(float, float, float, float) , glClearDepth(float) , and glClearStencil(int). |
static void |
glClearColor(float r,
float g,
float b,
float a)
glClearColor specifies the red, green, blue, and alpha values used by glClear(int) to clear the
color buffers. |
static void |
glClearDepth(float depth)
glClearDepth specifies the depth value used by glClear(int) to clear the depth buffer. |
static void |
glClearStencil(int stencil)
glClearStencil specifies the index used by glClear(int) to clear the stencil buffer. |
static void |
glColorMask(boolean red,
boolean green,
boolean blue,
boolean alpha)
glColorMask specifies whether the individual color components in the frame buffer can or cannot be written.
|
static void |
glCompileShader(int shaderID)
glCompileShader compiles the source code strings that have been stored in the shader object specified
by shaderID. |
static void |
glCompressedTexImage2D(int target,
int level,
int internalFormat,
int border,
long imageSize,
com.google.gwt.user.client.ui.Image image)
glCompressedTexImage2D defines a two-dimensional texture image or cube-map texture image using
compressed image data from client memory. |
static void |
glCompressedTexImage2D(int target,
int level,
int internalFormat,
int border,
long imageSize,
com.google.gwt.core.client.JavaScriptObject javaScriptObject)
glCompressedTexImage2D defines a two-dimensional texture image or cube-map texture image using
compressed image data from client memory. |
static void |
glCompressedTexImage2D(int target,
int level,
int internalFormat,
long width,
long height,
int border,
long imageSize,
com.google.gwt.typedarrays.shared.ArrayBufferView pixels)
glCompressedTexImage2D defines a two-dimensional texture image or cube-map texture image using
compressed image data from client memory. |
static void |
glCompressedTexSubImage2D(int target,
int level,
int xOffset,
int yOffset,
int format,
long imageSize,
com.google.gwt.user.client.ui.Image image)
glCompressedTexSubImage2D redefines a contiguous subregion of an existing two-dimensional texture
image. |
static void |
glCompressedTexSubImage2D(int target,
int level,
int xOffset,
int yOffset,
int format,
long imageSize,
com.google.gwt.core.client.JavaScriptObject data)
glCompressedTexSubImage2D redefines a contiguous subregion of an existing two-dimensional texture
image. |
static void |
glCompressedTexSubImage2D(int target,
int level,
int xOffset,
int yOffset,
long width,
long height,
int format,
long imageSize,
com.google.gwt.typedarrays.shared.ArrayBufferView data)
glCompressedTexSubImage2D redefines a contiguous subregion of an existing two-dimensional texture
image. |
static void |
glCopyTexImage2D(int target,
int level,
int internalFormat,
int x,
int y,
long width,
long height,
int border) |
static void |
glCopyTexSubImage2D(int target,
int level,
int xOffset,
int yOffset,
int x,
int y,
long width,
long height) |
static int |
glCreateBuffer() |
static int |
glCreateFramebuffer() |
static int |
glCreateProgram() |
static int |
glCreateRenderbuffer() |
static int |
glCreateShader(int type) |
static int |
glCreateTexture() |
static void |
glCullFace(int mode) |
static void |
glDeleteBuffer(int bufferID) |
static void |
glDeleteFramebuffer(int frameBufferID) |
static void |
glDeleteProgram(int programID) |
static void |
glDeleteRenderbuffer(int renderBufferID) |
static void |
glDeleteShader(int shaderID) |
static void |
glDeleteTexture(int textureID) |
static void |
glDepthFunc(int func) |
static void |
glDepthMask(boolean flag) |
static void |
glDepthRange(double nearVal,
double farVal) |
static void |
glDetachShader(int programID,
int shaderID) |
static void |
glDisable(int disableCap) |
static void |
glDisableVertexAttribArray(int index) |
static void |
glDrawArrays(int mode,
int first,
int count) |
static void |
glDrawElements(int mode,
int count,
int type,
int offset) |
static void |
glEnable(int enableCap) |
static void |
glEnableVertexAttribArray(int index) |
static void |
glFinish() |
static void |
glFlush() |
static void |
glFramebufferRenderbuffer(int target,
int attachment,
int renderbufferTarget,
int renderBuffer) |
static void |
glFramebufferTexture2D(int target,
int attachment,
int textureTarget,
int texture,
int level) |
static void |
glFrontFace(int mode) |
static void |
glGenerateMipmap(int target) |
static WebGL10.ActiveInfo |
glGetActiveAttrib(int programID,
int index) |
static WebGL10.ActiveInfo |
glGetActiveUniform(int programID,
int index) |
static int[] |
glGetAttachedShaders(int programID) |
static int |
glGetAttribLocation(int programID,
java.lang.String name) |
static int |
glGetBufferParameter(int target,
int pname) |
static com.google.gwt.dom.client.Element |
glGetCanvas() |
static WebGLContext.Attributes |
glGetContextAttributes() |
static int |
glGetDrawingBufferHeight() |
static int |
glGetDrawingBufferWidth() |
static int |
glGetError() |
static com.google.gwt.core.client.JavaScriptObject |
glGetExtension(java.lang.String name) |
static <T> T |
glGetFramebufferAttachmentParameter(int target,
int attachment,
int pname) |
static <T> T |
glGetParameter(int pname) |
static java.lang.String |
glGetProgramInfoLog(int programID) |
static <T> T |
glGetProgramParameter(int programID,
int pname) |
static int |
glGetRenderbufferParameter(int target,
int pname) |
static java.lang.String |
glGetShaderInfoLog(int shaderID) |
static <T> T |
glGetShaderParameter(int shaderID,
int pname) |
static WebGL10.ShaderPrecisionFormat |
glGetShaderPrecisionFormat(int shaderType,
int precisionType) |
static java.lang.String |
glGetShaderSource(int shaderID) |
static java.lang.String[] |
glGetSupportedExtensions() |
static int |
glGetTexParameter(int textureTarget,
int pname) |
static <T> T |
glGetUniform(int program,
int location) |
static int |
glGetUniformLocation(int programID,
java.lang.String name) |
static <T> T |
glGetVertexAttrib(int index,
int pname) |
static int |
glGetVertexAttribOffset(int index,
int pname) |
static void |
glHint(int target,
int mode) |
static boolean |
glIsBuffer(int bufferID) |
static boolean |
glIsContextLost() |
static boolean |
glIsEnabled(int enableCap) |
static boolean |
glIsFramebuffer(int framebufferID) |
static boolean |
glIsProgram(int programID) |
static boolean |
glIsRenderbuffer(int renderbufferID) |
static boolean |
glIsShader(int shaderID) |
static boolean |
glIsTexture(int textureID) |
static void |
glLineWidth(int width) |
static void |
glLinkProgram(int programID) |
static void |
glPixelStorei(int pname,
int param) |
static void |
glPolygonOffset(double factor,
double units) |
static void |
glReadPixels(int x,
int y,
int w,
int h,
int format,
int type,
com.google.gwt.typedarrays.shared.ArrayBufferView pixels) |
static void |
glRenderbufferStorage(int target,
int internalFormat,
int width,
int height) |
static void |
glSampleCoverage(float value,
boolean invert) |
static void |
glScissor(int x,
int y,
int w,
int h) |
static void |
glShaderSource(int shaderID,
java.lang.String source) |
static void |
glStencilFunc(int func,
int ref,
int mask) |
static void |
glStencilFuncSeparate(int face,
int func,
int ref,
int mask) |
static void |
glStencilMask(int mask) |
static void |
glStencilMaskSeparate(int face,
int mask) |
static void |
glStencilOp(int sFail,
int dpFail,
int dpPass) |
static void |
glStencilOpSeparate(int face,
int fail,
int zFail,
int zPass) |
static void |
glTexImage2D(int target,
int level,
int internalFormat,
int format,
int type,
com.google.gwt.user.client.ui.Image pixels) |
static void |
glTexImage2D(int target,
int level,
int internalFormat,
int format,
int type,
com.google.gwt.canvas.dom.client.ImageData pixels) |
static void |
glTexImage2D(int target,
int level,
int internalFormat,
int width,
int height,
int border,
int format,
int type,
com.google.gwt.typedarrays.shared.ArrayBufferView pixels) |
static void |
glTexImage2D(int target,
int level,
int internalFormat,
int format,
int type,
com.google.gwt.core.client.JavaScriptObject pixels) |
static void |
glTexParameterf(int target,
int pname,
float value) |
static void |
glTexParameteri(int target,
int pname,
int value) |
static void |
glTexSubImage2D(int target,
int level,
int xOffset,
int yOffset,
int width,
int height,
int format,
int type,
com.google.gwt.typedarrays.shared.ArrayBufferView pixels) |
static void |
glTexSubImage2D(int target,
int level,
int xOffset,
int yOffset,
int width,
int height,
int format,
int type,
com.google.gwt.canvas.client.Canvas pixels) |
static void |
glTexSubImage2D(int target,
int level,
int xOffset,
int yOffset,
int width,
int height,
int format,
int type,
com.google.gwt.user.client.ui.Image pixels) |
static void |
glTexSubImage2D(int target,
int level,
int xOffset,
int yOffset,
int width,
int height,
int format,
int type,
com.google.gwt.canvas.dom.client.ImageData pixels) |
static void |
glTexSubImage2D(int target,
int level,
int xOffset,
int yOffset,
int width,
int height,
int format,
int type,
com.google.gwt.core.client.JavaScriptObject pixels) |
static void |
glUniform1f(int location,
float x) |
static void |
glUniform1fv(int location,
com.google.gwt.typedarrays.shared.Float32Array x) |
static void |
glUniform1i(int location,
int x) |
static void |
glUniform1iv(int location,
com.google.gwt.typedarrays.shared.Int32Array x) |
static void |
glUniform2f(int location,
float x,
float y) |
static void |
glUniform2fv(int location,
com.google.gwt.typedarrays.shared.Float32Array xy) |
static void |
glUniform2i(int location,
int x,
int y) |
static void |
glUniform2iv(int location,
com.google.gwt.typedarrays.shared.Int32Array xy) |
static void |
glUniform3f(int location,
float x,
float y,
float z) |
static void |
glUniform3fv(int location,
com.google.gwt.typedarrays.shared.Float32Array xy) |
static void |
glUniform3i(int location,
int x,
int y,
int z) |
static void |
glUniform3iv(int location,
com.google.gwt.typedarrays.shared.Int32Array xy) |
static void |
glUniform4f(int location,
float x,
float y,
float z,
float w) |
static void |
glUniform4fv(int location,
com.google.gwt.typedarrays.shared.Float32Array xy) |
static void |
glUniform4i(int location,
int x,
int y,
int z,
int w) |
static void |
glUniform4iv(int location,
com.google.gwt.typedarrays.shared.Int32Array xy) |
static void |
glUniformMatrix2fv(int location,
boolean transpose,
float[] value) |
static void |
glUniformMatrix2fv(int location,
boolean transpose,
com.google.gwt.typedarrays.shared.Float32Array value) |
static void |
glUniformMatrix3fv(int location,
boolean transpose,
float[] value) |
static void |
glUniformMatrix3fv(int location,
boolean transpose,
com.google.gwt.typedarrays.shared.Float32Array value) |
static void |
glUniformMatrix4fv(int location,
boolean transpose,
float[] value) |
static void |
glUniformMatrix4fv(int location,
boolean transpose,
com.google.gwt.typedarrays.shared.Float32Array value) |
static void |
glUseProgram(int programID) |
static void |
glValidateProgram(int programID) |
static void |
glVertexAttrib1f(int index,
float x) |
static void |
glVertexAttrib1fv(int index,
com.google.gwt.typedarrays.shared.ArrayBufferView values) |
static void |
glVertexAttrib1fv(int index,
float[] values) |
static void |
glVertexAttrib1fv(int index,
com.google.gwt.core.client.JavaScriptObject values) |
static void |
glVertexAttrib2f(int index,
float x,
float y) |
static void |
glVertexAttrib2fv(int index,
com.google.gwt.typedarrays.shared.ArrayBufferView values) |
static void |
glVertexAttrib2fv(int index,
float[] values) |
static void |
glVertexAttrib2fv(int index,
com.google.gwt.core.client.JavaScriptObject values) |
static void |
glVertexAttrib3f(int index,
float x,
float y,
float z) |
static void |
glVertexAttrib3fv(int index,
com.google.gwt.typedarrays.shared.ArrayBufferView values) |
static void |
glVertexAttrib3fv(int index,
float[] values) |
static void |
glVertexAttrib3fv(int index,
com.google.gwt.core.client.JavaScriptObject values) |
static void |
glVertexAttrib4f(int index,
float x,
float y,
float z,
float w) |
static void |
glVertexAttrib4fv(int index,
com.google.gwt.typedarrays.shared.ArrayBufferView values) |
static void |
glVertexAttrib4fv(int index,
float[] values) |
static void |
glVertexAttrib4fv(int index,
com.google.gwt.core.client.JavaScriptObject values) |
static void |
glVertexAttribPointer(int index,
int size,
int type,
boolean normalized,
long stride,
long offset) |
static void |
glViewport(int x,
int y,
int w,
int h) |
static boolean |
isContextCompatible()
This method checks whether the current context supports WebGL 1.0 specification.
|
static boolean |
isSupported()
This method tests if WebGL 1.0 is supported in the browser.
|
public static final int GL_ACTIVE_ATTRIBUTES
public static final int GL_ACTIVE_TEXTURE
public static final int GL_ACTIVE_UNIFORMS
public static final int GL_ALIASED_LINE_WIDTH_RANGE
public static final int GL_ALIASED_POINT_SIZE_RANGE
public static final int GL_ALPHA
public static final int GL_ALPHA_BITS
public static final int GL_ALWAYS
public static final int GL_ARRAY_BUFFER
public static final int GL_ARRAY_BUFFER_BINDING
public static final int GL_ATTACHED_SHADERS
public static final int GL_BACK
public static final int GL_BLEND
public static final int GL_BLEND_COLOR
public static final int GL_BLEND_DST_ALPHA
public static final int GL_BLEND_DST_RGB
public static final int GL_BLEND_EQUATION
public static final int GL_BLEND_EQUATION_ALPHA
public static final int GL_BLEND_EQUATION_RGB
public static final int GL_BLEND_SRC_ALPHA
public static final int GL_BLEND_SRC_RGB
public static final int GL_BLUE_BITS
public static final int GL_BOOL
public static final int GL_BOOL_VEC2
public static final int GL_BOOL_VEC3
public static final int GL_BOOL_VEC4
public static final int GL_BROWSER_DEFAULT_WEBGL
public static final int GL_BUFFER_SIZE
public static final int GL_BUFFER_USAGE
public static final int GL_BYTE
public static final int GL_CCW
public static final int GL_CLAMP_TO_EDGE
public static final int GL_COLOR_ATTACHMENT0
public static final int GL_COLOR_BUFFER_BIT
public static final int GL_COLOR_CLEAR_VALUE
public static final int GL_COLOR_WRITEMASK
public static final int GL_COMPILE_STATUS
public static final int GL_COMPRESSED_TEXTURE_FORMATS
public static final int GL_CONSTANT_ALPHA
public static final int GL_CONSTANT_COLOR
public static final int GL_CONTEXT_LOST_WEBGL
public static final int GL_CULL_FACE
public static final int GL_CULL_FACE_MODE
public static final int GL_CURRENT_PROGRAM
public static final int GL_CURRENT_VERTEX_ATTRIB
public static final int GL_CW
public static final int GL_DECR
public static final int GL_DECR_WRAP
public static final int GL_DELETE_STATUS
public static final int GL_DEPTH_ATTACHMENT
public static final int GL_DEPTH_BITS
public static final int GL_DEPTH_BUFFER_BIT
public static final int GL_DEPTH_CLEAR_VALUE
public static final int GL_DEPTH_COMPONENT
public static final int GL_DEPTH_COMPONENT16
public static final int GL_DEPTH_FUNC
public static final int GL_DEPTH_RANGE
public static final int GL_DEPTH_STENCIL
public static final int GL_DEPTH_STENCIL_ATTACHMENT
public static final int GL_DEPTH_TEST
public static final int GL_DEPTH_WRITEMASK
public static final int GL_DITHER
public static final int GL_DONT_CARE
public static final int GL_DST_ALPHA
public static final int GL_DST_COLOR
public static final int GL_DYNAMIC_DRAW
public static final int GL_ELEMENT_ARRAY_BUFFER
public static final int GL_ELEMENT_ARRAY_BUFFER_BINDING
public static final int GL_EQUAL
public static final int GL_FALSE
public static final int GL_FASTEST
public static final int GL_FLOAT
public static final int GL_FLOAT_MAT2
public static final int GL_FLOAT_MAT3
public static final int GL_FLOAT_MAT4
public static final int GL_FLOAT_VEC2
public static final int GL_FLOAT_VEC3
public static final int GL_FLOAT_VEC4
public static final int GL_FRAGMENT_SHADER
public static final int GL_FRAMEBUFFER
public static final int GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME
public static final int GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE
public static final int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE
public static final int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL
public static final int GL_FRAMEBUFFER_BINDING
public static final int GL_FRAMEBUFFER_COMPLETE
public static final int GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT
public static final int GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS
public static final int GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT
public static final int GL_FRAMEBUFFER_UNSUPPORTED
public static final int GL_FRONT
public static final int GL_FRONT_AND_BACK
public static final int GL_FRONT_FACE
public static final int GL_FUNC_ADD
public static final int GL_FUNC_REVERSE_SUBTRACT
public static final int GL_FUNC_SUBTRACT
public static final int GL_GENERATE_MIPMAP_HINT
public static final int GL_GEQUAL
public static final int GL_GREATER
public static final int GL_GREEN_BITS
public static final int GL_HIGH_FLOAT
public static final int GL_HIGH_INT
public static final int GL_IMPLEMENTATION_COLOR_READ_FORMAT
public static final int GL_IMPLEMENTATION_COLOR_READ_TYPE
public static final int GL_INCR
public static final int GL_INCR_WRAP
public static final int GL_INT
public static final int GL_INT_VEC2
public static final int GL_INT_VEC3
public static final int GL_INT_VEC4
public static final int GL_INVALID_ENUM
public static final int GL_INVALID_FRAMEBUFFER_OPERATION
public static final int GL_INVALID_OPERATION
public static final int GL_INVALID_VALUE
public static final int GL_INVERT
public static final int GL_KEEP
public static final int GL_LEQUAL
public static final int GL_LESS
public static final int GL_LINEAR
public static final int GL_LINEAR_MIPMAP_LINEAR
public static final int GL_LINEAR_MIPMAP_NEAREST
public static final int GL_LINES
public static final int GL_LINE_LOOP
public static final int GL_LINE_STRIP
public static final int GL_LINE_WIDTH
public static final int GL_LINK_STATUS
public static final int GL_LOW_FLOAT
public static final int GL_LOW_INT
public static final int GL_LUMINANCE
public static final int GL_LUMINANCE_ALPHA
public static final int GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS
public static final int GL_MAX_CUBE_MAP_TEXTURE_SIZE
public static final int GL_MAX_FRAGMENT_UNIFORM_VECTORS
public static final int GL_MAX_RENDERBUFFER_SIZE
public static final int GL_MAX_TEXTURE_IMAGE_UNITS
public static final int GL_MAX_TEXTURE_SIZE
public static final int GL_MAX_VARYING_VECTORS
public static final int GL_MAX_VERTEX_ATTRIBS
public static final int GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS
public static final int GL_MAX_VERTEX_UNIFORM_VECTORS
public static final int GL_MAX_VIEWPORT_DIMS
public static final int GL_MEDIUM_FLOAT
public static final int GL_MEDIUM_INT
public static final int GL_MIRRORED_REPEAT
public static final int GL_NEAREST
public static final int GL_NEAREST_MIPMAP_LINEAR
public static final int GL_NEAREST_MIPMAP_NEAREST
public static final int GL_NEVER
public static final int GL_NICEST
public static final int GL_NONE
public static final int GL_NOTEQUAL
public static final int GL_NOERROR
public static final int GL_ONE
public static final int GL_ONE_MINUS_CONSTANT_ALPHA
public static final int GL_ONE_MINUS_CONSTANT_COLOR
public static final int GL_ONE_MINUS_DST_ALPHA
public static final int GL_ONE_MINUS_DST_COLOR
public static final int GL_ONE_MINUS_SRC_ALPHA
public static final int GL_ONE_MINUS_SRC_COLOR
public static final int GL_OUT_OF_MEMORY
public static final int GL_PACK_ALIGNMENT
public static final int GL_POINTS
public static final int GL_POLYGON_OFFSET_FACTOR
public static final int GL_POLYGON_OFFSET_FILL
public static final int GL_POLYGON_OFFSET_UNITS
public static final int GL_RED_BITS
public static final int GL_RENDERBUFFER
public static final int GL_RENDERBUFFER_ALPHA_SIZE
public static final int GL_RENDERBUFFER_BINDING
public static final int GL_RENDERBUFFER_BLUE_SIZE
public static final int GL_RENDERBUFFER_DEPTH_SIZE
public static final int GL_RENDERBUFFER_GREEN_SIZE
public static final int GL_RENDERBUFFER_HEIGHT
public static final int GL_RENDERBUFFER_INTERNAL_FORMAT
public static final int GL_RENDERBUFFER_RED_SIZE
public static final int GL_RENDERBUFFER_STENCIL_SIZE
public static final int GL_RENDERBUFFER_WIDTH
public static final int GL_RENDERER
public static final int GL_REPEAT
public static final int GL_REPLACE
public static final int GL_RGB
public static final int GL_RGB565
public static final int GL_RGB5_A1
public static final int GL_RGBA
public static final int GL_RGBA4
public static final int GL_SAMPLER_2D
public static final int GL_SAMPLER_CUBE
public static final int GL_SAMPLES
public static final int GL_SAMPLE_ALPHA_TO_COVERAGE
public static final int GL_SAMPLE_BUFFERS
public static final int GL_SAMPLE_COVERAGE
public static final int GL_SAMPLE_COVERAGE_INVERT
public static final int GL_SAMPLE_COVERAGE_VALUE
public static final int GL_SCISSOR_BOX
public static final int GL_SCISSOR_TEST
public static final int GL_SHADER_TYPE
public static final int GL_SHADING_LANGUAGE_VERSION
public static final int GL_SHORT
public static final int GL_SRC_ALPHA
public static final int GL_SRC_ALPHA_SATURATE
public static final int GL_SRC_COLOR
public static final int GL_STATIC_DRAW
public static final int GL_STENCIL_ATTACHMENT
public static final int GL_STENCIL_BACK_FAIL
public static final int GL_STENCIL_BACK_FUNC
public static final int GL_STENCIL_BACK_PASS_DEPTH_FAIL
public static final int GL_STENCIL_BACK_PASS_DEPTH_PASS
public static final int GL_STENCIL_BACK_REF
public static final int GL_STENCIL_BACK_VALUE_MASK
public static final int GL_STENCIL_BACK_WRITEMASK
public static final int GL_STENCIL_BITS
public static final int GL_STENCIL_BUFFER_BIT
public static final int GL_STENCIL_CLEAR_VALUE
public static final int GL_STENCIL_FAIL
public static final int GL_STENCIL_FUNC
public static final int GL_STENCIL_INDEX
public static final int GL_STENCIL_INDEX8
public static final int GL_STENCIL_PASS_DEPTH_FAIL
public static final int GL_STENCIL_PASS_DEPTH_PASS
public static final int GL_STENCIL_REF
public static final int GL_STENCIL_TEST
public static final int GL_STENCIL_VALUE_MASK
public static final int GL_STENCIL_WRITEMASK
public static final int GL_STREAM_DRAW
public static final int GL_SUBPIXEL_BITS
public static final int GL_TEXTURE
public static final int GL_TEXTURE0
public static final int GL_TEXTURE1
public static final int GL_TEXTURE2
public static final int GL_TEXTURE3
public static final int GL_TEXTURE4
public static final int GL_TEXTURE5
public static final int GL_TEXTURE6
public static final int GL_TEXTURE7
public static final int GL_TEXTURE8
public static final int GL_TEXTURE9
public static final int GL_TEXTURE10
public static final int GL_TEXTURE11
public static final int GL_TEXTURE12
public static final int GL_TEXTURE13
public static final int GL_TEXTURE14
public static final int GL_TEXTURE15
public static final int GL_TEXTURE16
public static final int GL_TEXTURE17
public static final int GL_TEXTURE18
public static final int GL_TEXTURE19
public static final int GL_TEXTURE20
public static final int GL_TEXTURE21
public static final int GL_TEXTURE22
public static final int GL_TEXTURE23
public static final int GL_TEXTURE24
public static final int GL_TEXTURE25
public static final int GL_TEXTURE26
public static final int GL_TEXTURE27
public static final int GL_TEXTURE28
public static final int GL_TEXTURE29
public static final int GL_TEXTURE30
public static final int GL_TEXTURE31
public static final int GL_TEXTURE_2D
public static final int GL_TEXTURE_BINDING_2D
public static final int GL_TEXTURE_BINDING_CUBE_MAP
public static final int GL_TEXTURE_CUBE_MAP
public static final int GL_TEXTURE_CUBE_MAP_NEGATIVE_X
public static final int GL_TEXTURE_CUBE_MAP_NEGATIVE_Y
public static final int GL_TEXTURE_CUBE_MAP_NEGATIVE_Z
public static final int GL_TEXTURE_CUBE_MAP_POSITIVE_X
public static final int GL_TEXTURE_CUBE_MAP_POSITIVE_Y
public static final int GL_TEXTURE_CUBE_MAP_POSITIVE_Z
public static final int GL_TEXTURE_MAG_FILTER
public static final int GL_TEXTURE_MIN_FILTER
public static final int GL_TEXTURE_WRAP_S
public static final int GL_TEXTURE_WRAP_T
public static final int GL_TRIANGLES
public static final int GL_TRIANGLE_FAN
public static final int GL_TRIANGLE_STRIP
public static final int GL_TRUE
public static final int GL_UNPACK_ALIGNMENT
public static final int GL_UNPACK_COLORSPACE_CONVERSION_WEBGL
public static final int GL_UNPACK_FLIP_Y_WEBGL
public static final int GL_UNPACK_PREMULTIPLY_ALPHA_WEBGL
public static final int GL_UNSIGNED_BYTE
public static final int GL_UNSIGNED_INT
public static final int GL_UNSIGNED_SHORT
public static final int GL_UNSIGNED_SHORT_4_4_4_4
public static final int GL_UNSIGNED_SHORT_5_5_5_1
public static final int GL_UNSIGNED_SHORT_5_6_5
public static final int GL_VALIDATE_STATUS
public static final int GL_VENDOR
public static final int GL_VERSION
public static final int GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING
public static final int GL_VERTEX_ATTRIB_ARRAY_ENABLED
public static final int GL_VERTEX_ATTRIB_ARRAY_NORMALIZED
public static final int GL_VERTEX_ATTRIB_ARRAY_POINTER
public static final int GL_VERTEX_ATTRIB_ARRAY_SIZE
public static final int GL_VERTEX_ATTRIB_ARRAY_STRIDE
public static final int GL_VERTEX_ATTRIB_ARRAY_TYPE
public static final int GL_VERTEX_SHADER
public static final int GL_VIEWPORT
public static final int GL_ZERO
public static WebGLContext createContext(com.google.gwt.canvas.client.Canvas canvas)
canvas - The canvas object to creeate the context upon.public static WebGLContext createContext(com.google.gwt.canvas.client.Canvas canvas, WebGLContext.Attributes attributes)
canvas - The canvas object to creeate the context upon.attributes - The context attributes to request the context with.public static WebGLContext createContext(com.google.gwt.dom.client.CanvasElement canvas)
canvas - The canvas element to creeate the context upon.public static WebGLContext createContext(com.google.gwt.dom.client.CanvasElement canvas, WebGLContext.Attributes attributes)
canvas - The canvas element to creeate the context upon.attributes - The context attributes to request the context with.public static boolean isSupported()
public static boolean isContextCompatible()
public static void glActiveTexture(int texture)
glActiveTexture selects which texture unit subsequent texture state calls will affect. The number of
texture units an implementation supports is implementation dependent, but must be at least 48.
GL_INVALID_ENUM is generated if texture is not one of GL_TEXTUREi, where i ranges
from 0 to (GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS - 1).
texture - Specifies which texture unit to make active. The number of texture units is implementation
dependent, but must be at least 48. texture must be one of GL_TEXTUREi, where i
ranges from 0 (GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS - 1). The initial value is GL_TEXTURE0.public static void glAttachShader(int programID,
int shaderID)
glAttachShader attaches the shader object specified by shaderID to the program object
specified by programID. This indicates that shader will be included in link operations that will be
performed on program.
GL_INVALID_VALUE is generated if either program or shader is not a value generated by OpenGL.
GL_INVALID_OPERATION is generated if program is not a program object.
GL_INVALID_OPERATION is generated if shader is not a shader object.
GL_INVALID_OPERATION is generated if shader is already attached to program.
programID - Specifies the program object to which a shader object will be attached.shaderID - Specifies the shader object that is to be attached.public static void glBindAttribLocation(int programID,
int index,
java.lang.String name)
glBindAttribLocation is used to associate a user-defined attribute variable in the program object
specified by programID with a generic vertex attribute index. The name of the user-defined attribute
variable is string in name. The generic vertex attribute index to be bound to this variable is specified
by index. When program is made part of current state, values provided via the generic vertex
attribute index will modify the value of the user-defined attribute variable specified by name.
GL_INVALID_VALUE is generated if index is greater than or equal to GL_MAX_VERTEX_ATTRIBS.
GL_INVALID_OPERATION is generated if name starts with the reserved prefix "gl_".
GL_INVALID_VALUE is generated if program is not a value generated by OpenGL.
GL_INVALID_OPERATION is generated if program is not a program object.
programID - Specifies the handle of the program object in which the association is to be made.index - Specifies the index of the generic vertex attribute to be bound.name - Specifies a string containing the name of the vertex shader attribute variable to which index is to be bound.public static void glBindBuffer(int target,
int buffer)
glBindBuffer binds a buffer object to the specified buffer binding point. Calling glBindBuffer
with target set to one of the accepted symbolic constants and buffer set to the name of a buffer
object binds that buffer object name to the target. If no buffer object with name buffer exists, one is
created with that name. When a buffer object is bound to a target, the previous binding for that target is
automatically broken.
GL_INVALID_ENUM is generated if target is not one of the allowable values.
GL_INVALID_VALUE is generated if buffer is not a name previously returned from a call to glCreateBuffer().
target - Specifies the target to which the buffer object is bound. The symbolic constant must be GL_ARRAY_BUFFER, GL_ELEMENT_ARRAY_BUFFER.buffer - Specifies the name of a buffer object.public static void glBindFramebuffer(int target,
int frameBuffer)
glBindFramebuffer binds the framebuffer object with name framebuffer to the framebuffer target
specified by target. target must be GL_FRAMEBUFFER. If a framebuffer object is bound, it becomes the
target for rendering or readback operations, respectively, until it is deleted or another framebuffer is bound to
the corresponding bind point.
GL_INVALID_ENUM is generated if target is not GL_FRAMEBUFFER.
GL_INVALID_OPERATION is generated if framebuffer is not zero or the name of a framebuffer previously
returned from a call to glCreateFramebuffer().
target - Specifies the framebuffer target of the binding operation.frameBuffer - Specifies the name of the framebuffer object to bind.public static void glBindRenderbuffer(int target,
int renderBuffer)
glBindRenderbuffer binds the renderbuffer object with name renderbuffer to the renderbuffer target
specified by target. target must be GL_RENDERBUFFER. renderbuffer is the name of a renderbuffer
object previously returned from a call to glCreateRenderbuffer(), or zero to break the existing binding
of a renderbuffer object to target.
GL_INVALID_ENUM is generated if target is not GL_RENDERBUFFER.
GL_INVALID_OPERATION is generated if renderbuffer is not zero or the name of a renderbuffer
previously returned from a call to glCreateRenderbuffer().
target - Specifies the renderbuffer target of the binding operation. target must be GL_RENDERBUFFER.renderBuffer - Specifies the name of the renderbuffer object to bind.public static void glBindTexture(int target,
int textureID)
glBindTexture lets you create or use a named texture. Calling glBindTexture with target set to
GL_TEXTURE_2D, GL_TEXTURE_CUBE_MAP, and texture set to the name of the new texture binds the
texture name to the target. When a texture is bound to a target, the previous binding for that target is
automatically broken.
GL_INVALID_ENUM is generated if target is not one of the allowable values.
GL_INVALID_VALUE is generated if target is not a name returned from a previous call to glCreateTexture().
GL_INVALID_OPERATION is generated if texture was previously created with a target that
doesn't match that of target.
target - Specifies the target to which the texture is bound. Must be either GL_TEXTURE_2D or
GL_TEXTURE_CUBE_MAP.textureID - Specifies the name of a texture.public static void glBlendColor(float r,
float g,
float b,
float a)
GL_BLEND_COLOR may be used to calculate the source and destination blending factors. The color
components are clamped to the range [0,1] before being stored. See glBlendFunc(int, int) for a
complete description of the blending operations. Initially the GL_BLEND_COLOR is set to (0, 0, 0,
0).r - Specifies the red component of GL_BLEND_COLOR.g - Specifies the green component of GL_BLEND_COLOR.b - Specifies the blue component of GL_BLEND_COLOR.a - Specifies the alpha component of GL_BLEND_COLOR.public static void glBlendEquation(int mode)
The blend equations determine how a new pixel (the ''source'' color) is combined with a pixel already in the framebuffer (the ''destination'' color). This function sets both the RGB blend equation and the alpha blend equation to a single equation.
GL_INVALID_ENUM is generated if mode is not one of GL_FUNC_ADD, GL_FUNC_SUBTRACT,
or GL_FUNC_REVERSE_SUBTRACT.
mode - specifies how source and destination colors are combined. It must be GL_FUNC_ADD, GL_FUNC_SUBTRACT, or GL_FUNC_REVERSE_SUBTRACT.public static void glBlendEquationSeparate(int modeRGB,
int modeAlpha)
The blend equations determines how a new pixel (the ''source'' color) is combined with a pixel already in the framebuffer (the ''destination'' color). This function specifies one blend equation for the RGB-color components and one blend equation for the alpha component.
GL_INVALID_ENUM is generated if either modeRGB or modeAlpha is not one of GL_FUNC_ADD,
GL_FUNC_SUBTRACT, or GL_FUNC_REVERSE_SUBTRACT.
modeRGB - Specifies the RGB blend equation, how the red, green, and blue components of the source and
destination colors are combined. It must be GL_FUNC_ADD, GL_FUNC_SUBTRACT, or
GL_FUNC_REVERSE_SUBTRACT.modeAlpha - Specifies the alpha blend equation, how the alpha component of the source and destination colors
are combined. It must be GL_FUNC_ADD, GL_FUNC_SUBTRACT, or GL_FUNC_REVERSE_SUBTRACT.public static void glBlendFunc(int srcFactor,
int dstFactor)
glBlendFunc defines the operation of blending when it is enabled. srcFactor specifies which
method is used to scale the source color components. dstFactor specifies which method is used to scale
the destination color components.
GL_INVALID_ENUM is generated if either srcFactor or dstFactor is not an accepted
value.
srcFactor - Specifies how the red, green, blue, and alpha source blending factors are computed. The
following symbolic constants are accepted: GL_ZERO, GL_ONE, GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR, GL_DST_COLOR, GL_ONE_MINUS_DST_COLOR, GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_DST_ALPHA, GL_ONE_MINUS_DST_ALPHA, GL_CONSTANT_COLOR, GL_ONE_MINUS_CONSTANT_COLOR, GL_CONSTANT_ALPHA, GL_ONE_MINUS_CONSTANT_ALPHA,
and GL_SRC_ALPHA_SATURATE. The initial value is GL_ONE.dstFactor - Specifies how the red, green, blue, and alpha destination blending factors are computed. The
following symbolic constants are accepted: GL_ZERO, GL_ONE, GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR, GL_DST_COLOR, GL_ONE_MINUS_DST_COLOR, GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_DST_ALPHA, GL_ONE_MINUS_DST_ALPHA. GL_CONSTANT_COLOR, GL_ONE_MINUS_CONSTANT_COLOR, GL_CONSTANT_ALPHA, and GL_ONE_MINUS_CONSTANT_ALPHA. The initial value is GL_ZERO.public static void glBlendFuncSeparate(int srcRGB,
int dstRGB,
int srcAlpha,
int dstAlpha)
glBlendFuncSeparate defines the operation of blending when it is enabled. srcRGB specifies
which method is used to scale the source RGB-color components. dstRGB specifies which method is used to
scale the destination RGB-color components. Likewise, srcAlpha specifies which method is used to scale
the source alpha color component, and dstAlpha specifies which method is used to scale the destination
alpha component.
GL_INVALID_ENUM is generated if srcRGB, dstRGB, srcAlpha, or dstAlpha
is not an accepted value.
srcRGB - Specifies how the red, green, and blue blending factors are computed. The following symbolic
constants are accepted: GL_ZERO, GL_ONE, GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR, GL_DST_COLOR, GL_ONE_MINUS_DST_COLOR, GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_DST_ALPHA, GL_ONE_MINUS_DST_ALPHA, GL_CONSTANT_COLOR, GL_ONE_MINUS_CONSTANT_COLOR,
GL_CONSTANT_ALPHA, GL_ONE_MINUS_CONSTANT_ALPHA, and GL_SRC_ALPHA_SATURATE. The initial value is GL_ONE.dstRGB - Specifies how the red, green, and blue destination blending factors are computed. The following
symbolic constants are accepted: GL_ZERO, GL_ONE, GL_SRC_COLOR, GL_ONE_MINUS_SRC_COLOR, GL_DST_COLOR, GL_ONE_MINUS_DST_COLOR, GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, GL_DST_ALPHA, GL_ONE_MINUS_DST_ALPHA. GL_CONSTANT_COLOR, GL_ONE_MINUS_CONSTANT_COLOR,
GL_CONSTANT_ALPHA, and GL_ONE_MINUS_CONSTANT_ALPHA. The initial value is GL_ZERO.srcAlpha - Specified how the alpha source blending factor is computed. The same symbolic constants are
accepted as for srcRGB. The initial value is GL_ONE.dstAlpha - Specified how the alpha destination blending factor is computed. The same symbolic constants are
accepted as for dstRGB. The initial value is GL_ZERO.public static void glBufferData(int target,
int size,
int usage)
glBufferData creates a new data store for the buffer object currently bound to target. Any
pre-existing data store is deleted. The new data store is created with the specified size and usage.
usage is a hint to the GL implementation as to how a buffer object's data store will be accessed. This
enables the GL implementation to make more intelligent decisions that may significantly impact buffer object
performance. It does not, however, constrain the actual usage of the data store.
GL_INVALID_ENUM is generated if target is not GL_ARRAY_BUFFER or GL_ELEMENT_ARRAY_BUFFER.
GL_INVALID_ENUM is generated if usage is not GL_STREAM_DRAW, GL_STATIC_DRAW, or
GL_DYNAMIC_DRAW.
GL_INVALID_OPERATION is generated if the reserved buffer object name 0 is bound to target.
GL_OUT_OF_MEMORY is generated if the GL is unable to create a data store with the specified
size.
target - Specifies the target buffer object. The symbolic constant must be GL_ARRAY_BUFFER or
GL_ELEMENT_ARRAY_BUFFER.size - Specifies the size of the data store to be created..usage - Specifies the expected usage pattern of the data store. The symbolic constant must be GL_STREAM_DRAW, GL_STATIC_DRAW, or GL_DYNAMIC_DRAW.public static void glBufferData(int target,
float[] data,
int usage)
glBufferData creates a new data store for the buffer object currently bound to target. Any
pre-existing data store is deleted. The new data store is created with the size of the data and usage.
usage is a hint to the GL implementation as to how a buffer object's data store will be accessed. This
enables the GL implementation to make more intelligent decisions that may significantly impact buffer object
performance. It does not, however, constrain the actual usage of the data store.
GL_INVALID_ENUM is generated if target is not GL_ARRAY_BUFFER or GL_ELEMENT_ARRAY_BUFFER.
GL_INVALID_ENUM is generated if usage is not GL_STREAM_DRAW, GL_STATIC_DRAW, or
GL_DYNAMIC_DRAW.
GL_INVALID_OPERATION is generated if the reserved buffer object name 0 is bound to target.
GL_OUT_OF_MEMORY is generated if the GL is unable to create a data store with the specified
size.
target - Specifies the target buffer object. The symbolic constant must be GL_ARRAY_BUFFER or
GL_ELEMENT_ARRAY_BUFFER.data - Specifies the data which should be copied into the data store.usage - Specifies the expected usage pattern of the data store. The symbolic constant must be GL_STREAM_DRAW, GL_STATIC_DRAW, or GL_DYNAMIC_DRAW.public static void glBufferData(int target,
int[] data,
int usage)
glBufferData creates a new data store for the buffer object currently bound to target. Any
pre-existing data store is deleted. The new data store is created with the size of the data and usage.
usage is a hint to the GL implementation as to how a buffer object's data store will be accessed. This
enables the GL implementation to make more intelligent decisions that may significantly impact buffer object
performance. It does not, however, constrain the actual usage of the data store.
GL_INVALID_ENUM is generated if target is not GL_ARRAY_BUFFER or GL_ELEMENT_ARRAY_BUFFER.
GL_INVALID_ENUM is generated if usage is not GL_STREAM_DRAW, GL_STATIC_DRAW, or
GL_DYNAMIC_DRAW.
GL_INVALID_OPERATION is generated if the reserved buffer object name 0 is bound to target.
GL_OUT_OF_MEMORY is generated if the GL is unable to create a data store with the specified
size.
target - Specifies the target buffer object. The symbolic constant must be GL_ARRAY_BUFFER or
GL_ELEMENT_ARRAY_BUFFER.data - Specifies the data which should be copied into the data store.usage - Specifies the expected usage pattern of the data store. The symbolic constant must be GL_STREAM_DRAW, GL_STATIC_DRAW, or GL_DYNAMIC_DRAW.public static void glBufferData(int target,
short[] data,
int usage)
glBufferData creates a new data store for the buffer object currently bound to target. Any
pre-existing data store is deleted. The new data store is created with the size of the data and usage.
usage is a hint to the GL implementation as to how a buffer object's data store will be accessed. This
enables the GL implementation to make more intelligent decisions that may significantly impact buffer object
performance. It does not, however, constrain the actual usage of the data store.
GL_INVALID_ENUM is generated if target is not GL_ARRAY_BUFFER or GL_ELEMENT_ARRAY_BUFFER.
GL_INVALID_ENUM is generated if usage is not GL_STREAM_DRAW, GL_STATIC_DRAW, or
GL_DYNAMIC_DRAW.
GL_INVALID_OPERATION is generated if the reserved buffer object name 0 is bound to target.
GL_OUT_OF_MEMORY is generated if the GL is unable to create a data store with the specified
size.
target - Specifies the target buffer object. The symbolic constant must be GL_ARRAY_BUFFER or
GL_ELEMENT_ARRAY_BUFFER.data - Specifies the data which should be copied into the data store.usage - Specifies the expected usage pattern of the data store. The symbolic constant must be GL_STREAM_DRAW, GL_STATIC_DRAW, or GL_DYNAMIC_DRAW.public static void glBufferData(int target,
com.google.gwt.typedarrays.shared.ArrayBufferView data,
int usage)
glBufferData creates a new data store for the buffer object currently bound to target. Any
pre-existing data store is deleted. The new data store is created with the size of the data and usage.
usage is a hint to the GL implementation as to how a buffer object's data store will be accessed. This
enables the GL implementation to make more intelligent decisions that may significantly impact buffer object
performance. It does not, however, constrain the actual usage of the data store.
GL_INVALID_ENUM is generated if target is not GL_ARRAY_BUFFER or GL_ELEMENT_ARRAY_BUFFER.
GL_INVALID_ENUM is generated if usage is not GL_STREAM_DRAW, GL_STATIC_DRAW, or
GL_DYNAMIC_DRAW.
GL_INVALID_OPERATION is generated if the reserved buffer object name 0 is bound to target.
GL_OUT_OF_MEMORY is generated if the GL is unable to create a data store with the specified
size.
target - Specifies the target buffer object. The symbolic constant must be GL_ARRAY_BUFFER or
GL_ELEMENT_ARRAY_BUFFER.data - Specifies the data which should be copied into the data store.usage - Specifies the expected usage pattern of the data store. The symbolic constant must be GL_STREAM_DRAW, GL_STATIC_DRAW, or GL_DYNAMIC_DRAW.public static void glBufferSubData(int target,
int offset,
com.google.gwt.typedarrays.shared.ArrayBufferView data)
glBufferSubData redefines some or all of the data store for the buffer object currently bound to
target. Data starting at byte offset offset and extending for sizeof data bytes is copied
to the data store from the memory pointed to by data. An error is thrown if offset and size together define a range beyond the bounds of the buffer object's data store.
GL_INVALID_ENUM is generated if target is not GL_ARRAY_BUFFER or GL_ELEMENT_ARRAY_BUFFER.
GL_INVALID_VALUE is generated if offset or size is negative, or if together they define a region of
memory that extends beyond the buffer object's allocated data store.
GL_INVALID_OPERATION is generated if the reserved buffer object name 0 is bound to target.
target - Specifies the target buffer object. The symbolic constant must be GL_ARRAY_BUFFER or
GL_ELEMENT_ARRAY_BUFFER.offset - Specifies the offset into the buffer object's data store where data replacement will begin,
measured in bytes.data - Specifies the new data that will be copied into the data store.public static void glBufferSubData(int target,
int offset,
float[] data)
glBufferSubData redefines some or all of the data store for the buffer object currently bound to
target. Data starting at byte offset offset and extending for sizeof data bytes is copied
to the data store from the memory pointed to by data. An error is thrown if offset and size together define a range beyond the bounds of the buffer object's data store.
GL_INVALID_ENUM is generated if target is not GL_ARRAY_BUFFER or GL_ELEMENT_ARRAY_BUFFER.
GL_INVALID_VALUE is generated if offset or size is negative, or if together they define a region of
memory that extends beyond the buffer object's allocated data store.
GL_INVALID_OPERATION is generated if the reserved buffer object name 0 is bound to target.
target - Specifies the target buffer object. The symbolic constant must be GL_ARRAY_BUFFER or
GL_ELEMENT_ARRAY_BUFFER.offset - Specifies the offset into the buffer object's data store where data replacement will begin,
measured in bytes.data - Specifies the new data that will be copied into the data store.public static void glBufferSubData(int target,
int offset,
int[] data)
glBufferSubData redefines some or all of the data store for the buffer object currently bound to
target. Data starting at byte offset offset and extending for sizeof data bytes is copied
to the data store from the memory pointed to by data. An error is thrown if offset and size together define a range beyond the bounds of the buffer object's data store.
GL_INVALID_ENUM is generated if target is not GL_ARRAY_BUFFER or GL_ELEMENT_ARRAY_BUFFER.
GL_INVALID_VALUE is generated if offset or size is negative, or if together they define a region of
memory that extends beyond the buffer object's allocated data store.
GL_INVALID_OPERATION is generated if the reserved buffer object name 0 is bound to target.
target - Specifies the target buffer object. The symbolic constant must be GL_ARRAY_BUFFER or
GL_ELEMENT_ARRAY_BUFFER.offset - Specifies the offset into the buffer object's data store where data replacement will begin,
measured in bytes.data - Specifies the new data that will be copied into the data store.public static void glBufferSubData(int target,
int offset,
short[] data)
glBufferSubData redefines some or all of the data store for the buffer object currently bound to
target. Data starting at byte offset offset and extending for sizeof data bytes is copied
to the data store from the memory pointed to by data. An error is thrown if offset and size together define a range beyond the bounds of the buffer object's data store.
GL_INVALID_ENUM is generated if target is not GL_ARRAY_BUFFER or GL_ELEMENT_ARRAY_BUFFER.
GL_INVALID_VALUE is generated if offset or size is negative, or if together they define a region of
memory that extends beyond the buffer object's allocated data store.
GL_INVALID_OPERATION is generated if the reserved buffer object name 0 is bound to target.
target - Specifies the target buffer object. The symbolic constant must be GL_ARRAY_BUFFER or
GL_ELEMENT_ARRAY_BUFFER.offset - Specifies the offset into the buffer object's data store where data replacement will begin,
measured in bytes.data - Specifies the new data that will be copied into the data store.public static void glBufferSubData(int target,
int offset,
byte[] data)
glBufferSubData redefines some or all of the data store for the buffer object currently bound to
target. Data starting at byte offset offset and extending for sizeof data bytes is copied
to the data store from the memory pointed to by data. An error is thrown if offset and size together define a range beyond the bounds of the buffer object's data store.
GL_INVALID_ENUM is generated if target is not GL_ARRAY_BUFFER or GL_ELEMENT_ARRAY_BUFFER.
GL_INVALID_VALUE is generated if offset or size is negative, or if together they define a region of
memory that extends beyond the buffer object's allocated data store.
GL_INVALID_OPERATION is generated if the reserved buffer object name 0 is bound to target.
target - Specifies the target buffer object. The symbolic constant must be GL_ARRAY_BUFFER or
GL_ELEMENT_ARRAY_BUFFER.offset - Specifies the offset into the buffer object's data store where data replacement will begin,
measured in bytes.data - Specifies the new data that will be copied into the data store.public static void glBufferSubData(int target,
int offset,
int size,
float[] data)
glBufferSubData redefines some or all of the data store for the buffer object currently bound to
target. Data starting at byte offset offset and extending for size bytes is copied to the
data store from the memory pointed to by data. An error is thrown if offset and size
together define a range beyond the bounds of the buffer object's data store.
GL_INVALID_ENUM is generated if target is not GL_ARRAY_BUFFER or GL_ELEMENT_ARRAY_BUFFER.
GL_INVALID_VALUE is generated if offset or size is negative, or if together they define a region of
memory that extends beyond the buffer object's allocated data store.
GL_INVALID_OPERATION is generated if the reserved buffer object name 0 is bound to target.
target - Specifies the target buffer object. The symbolic constant must be GL_ARRAY_BUFFER or
GL_ELEMENT_ARRAY_BUFFER.offset - Specifies the offset into the buffer object's data store where data replacement will begin,
measured in bytes.size - Specifies the size in bytes of the data store region being replaced.data - Specifies the new data that will be copied into the data store.public static void glBufferSubData(int target,
int offset,
int size,
int[] data)
glBufferSubData redefines some or all of the data store for the buffer object currently bound to
target. Data starting at byte offset offset and extending for size bytes is copied to the
data store from the memory pointed to by data. An error is thrown if offset and size
together define a range beyond the bounds of the buffer object's data store.
GL_INVALID_ENUM is generated if target is not GL_ARRAY_BUFFER or GL_ELEMENT_ARRAY_BUFFER.
GL_INVALID_VALUE is generated if offset or size is negative, or if together they define a region of
memory that extends beyond the buffer object's allocated data store.
GL_INVALID_OPERATION is generated if the reserved buffer object name 0 is bound to target.
target - Specifies the target buffer object. The symbolic constant must be GL_ARRAY_BUFFER or
GL_ELEMENT_ARRAY_BUFFER.offset - Specifies the offset into the buffer object's data store where data replacement will begin,
measured in bytes.size - Specifies the size in bytes of the data store region being replaced.data - Specifies the new data that will be copied into the data store.public static void glBufferSubData(int target,
int offset,
int size,
short[] data)
glBufferSubData redefines some or all of the data store for the buffer object currently bound to
target. Data starting at byte offset offset and extending for size bytes is copied to the
data store from the memory pointed to by data. An error is thrown if offset and size
together define a range beyond the bounds of the buffer object's data store.
GL_INVALID_ENUM is generated if target is not GL_ARRAY_BUFFER or GL_ELEMENT_ARRAY_BUFFER.
GL_INVALID_VALUE is generated if offset or size is negative, or if together they define a region of
memory that extends beyond the buffer object's allocated data store.
GL_INVALID_OPERATION is generated if the reserved buffer object name 0 is bound to target.
target - Specifies the target buffer object. The symbolic constant must be GL_ARRAY_BUFFER or
GL_ELEMENT_ARRAY_BUFFER.offset - Specifies the offset into the buffer object's data store where data replacement will begin,
measured in bytes.size - Specifies the size in bytes of the data store region being replaced.data - Specifies the new data that will be copied into the data store.public static void glBufferSubData(int target,
int offset,
int size,
com.google.gwt.typedarrays.shared.ArrayBufferView data)
glBufferSubData redefines some or all of the data store for the buffer object currently bound to
target. Data starting at byte offset offset and extending for size bytes is copied to the
data store from the memory pointed to by data. An error is thrown if offset and size
together define a range beyond the bounds of the buffer object's data store.
GL_INVALID_ENUM is generated if target is not GL_ARRAY_BUFFER or GL_ELEMENT_ARRAY_BUFFER.
GL_INVALID_VALUE is generated if offset or size is negative, or if together they define a region of
memory that extends beyond the buffer object's allocated data store.
GL_INVALID_OPERATION is generated if the reserved buffer object name 0 is bound to target.
target - Specifies the target buffer object. The symbolic constant must be GL_ARRAY_BUFFER or
GL_ELEMENT_ARRAY_BUFFER.offset - Specifies the offset into the buffer object's data store where data replacement will begin,
measured in bytes.size - Specifies the size in bytes of the data store region being replaced.data - Specifies the new data that will be copied into the data store.@WebGLContext.HandlesContextLoss public static int glCheckFramebufferStatus(int target)
glCheckFramebufferStatus returns a symbolic constant that identifies whether or not the currently
bound framebuffer is framebuffer complete, and if not, which of the rules of framebuffer completeness is
violated.
GL_INVALID_ENUM is generated if target is not GL_FRAMEBUFFER.
target - Specifies the target framebuffer object. The symbolic constant must be GL_FRAMEBUFFER.public static void glClear(int masks)
glClear sets the bitplane area of the window to values previously selected by glClearColor(float, float, float, float) , glClearDepth(float) , and glClearStencil(int).
GL_INVALID_VALUE is generated if any bit other than the three defined bits is set in mask.
masks - Bitwise OR of masks that indicate the buffers to be cleared. The three masks are GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, and GL_STENCIL_BUFFER_BIT.public static void glClearColor(float r,
float g,
float b,
float a)
glClearColor specifies the red, green, blue, and alpha values used by glClear(int) to clear the
color buffers. Values specified by glClearColor are clamped to the range [0,1].r - Specifies the red value used when the color buffers are cleared.g - Specifies the green value used when the color buffers are cleared.b - Specifies the blue value used when the color buffers are cleared.a - Specifies the alpha value used when the color buffers are cleared.public static void glClearDepth(float depth)
glClearDepth specifies the depth value used by glClear(int) to clear the depth buffer. Values
specified by glClearDepth are clamped to the range [0,1].depth - Specifies the depth value used when the depth buffer is cleared. The initial value is 1.public static void glClearStencil(int stencil)
glClearStencil specifies the index used by glClear(int) to clear the stencil buffer. stencil is masked with 2m-1, where m is the number of bits in the stencil
buffer.stencil - Specifies the index used when the stencil buffer is cleared. The initial value is 0.public static void glColorMask(boolean red,
boolean green,
boolean blue,
boolean alpha)
glColorMask specifies whether the individual color components in the frame buffer can or cannot be written. If
red is false, for example, no change is made to the red component of any pixel in any of the color
buffers, regardless of the drawing operation attempted.
red - Specifies whether red can or cannot be written into the framebuffer.green - Specifies whether green can or cannot be written into the framebuffer.blue - Specifies whether blue can or cannot be written into the framebuffer.alpha - Specifies whether alpha can or cannot be written into the framebuffer.public static void glCompileShader(int shaderID)
glCompileShader compiles the source code strings that have been stored in the shader object specified
by shaderID.
GL_INVALID_VALUE is generated if shader is not a value generated by OpenGL.
GL_INVALID_OPERATION is generated if shader is not a shader object.
shaderID - Specifies the shader object to be compiled.public static void glCompressedTexImage2D(int target,
int level,
int internalFormat,
int border,
long imageSize,
com.google.gwt.user.client.ui.Image image)
glCompressedTexImage2D defines a two-dimensional texture image or cube-map texture image using
compressed image data from client memory. The texture image is decoded according to the extension specification
defining the specified internalFormat. OpenGL ES defines no specific compressed texture formats, but does provide
a mechanism to obtain symbolic constants for such formats provided by extensions.
GL_INVALID_ENUM is generated if target is not GL_TEXTURE_2D, GL_TEXTURE_CUBE_MAP_POSITIVE_X, GL_TEXTURE_CUBE_MAP_NEGATIVE_X, GL_TEXTURE_CUBE_MAP_POSITIVE_Y, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, GL_TEXTURE_CUBE_MAP_POSITIVE_Z, or GL_TEXTURE_CUBE_MAP_NEGATIVE_Z.
GL_INVALID_ENUM is generated if internalFormat is not a supported format returned in GL_COMPRESSED_TEXTURE_FORMATS.
GL_INVALID_VALUE is generated if level is less than 0.
GL_INVALID_VALUE may be generated if level is greater than log2 max, where
max is the returned value of GL_MAX_TEXTURE_SIZE when target is GL_TEXTURE_2D or GL_MAX_CUBE_MAP_TEXTURE_SIZE when target is not GL_TEXTURE_2D.
GL_INVALID_VALUE is generated if border is not 0.
GL_INVALID_VALUE is generated if imageSize is not consistent with the format, dimensions, and
contents of the specified compressed image data.
GL_INVALID_OPERATION is generated if parameter combinations are not supported by the specific
compressed internal format as specified in the specific texture compression extension.
Undefined results, including abnormal program termination, are generated if data is not encoded in a manner consistent with the extension specification defining the internal compression format.
target - Specifies the target texture of the active texture unit.level - Specifies the level-of-detail number. Level 0 is the base image level. Level n is the nth
mipmap reduction image.internalFormat - Specifies the format of the compressed image data stored at address data.border - Specifies the width of the border. Must be 0.imageSize - Specifies the number of unsigned bytes of image data starting at the address specified by
data.image - Specifies a pointer to the compressed image data in memory.public static void glCompressedTexImage2D(int target,
int level,
int internalFormat,
long width,
long height,
int border,
long imageSize,
com.google.gwt.typedarrays.shared.ArrayBufferView pixels)
glCompressedTexImage2D defines a two-dimensional texture image or cube-map texture image using
compressed image data from client memory. The texture image is decoded according to the extension specification
defining the specified internalFormat. OpenGL ES defines no specific compressed texture formats, but does provide
a mechanism to obtain symbolic constants for such formats provided by extensions.
GL_INVALID_ENUM is generated if target is not GL_TEXTURE_2D, GL_TEXTURE_CUBE_MAP_POSITIVE_X, GL_TEXTURE_CUBE_MAP_NEGATIVE_X, GL_TEXTURE_CUBE_MAP_POSITIVE_Y, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, GL_TEXTURE_CUBE_MAP_POSITIVE_Z, or GL_TEXTURE_CUBE_MAP_NEGATIVE_Z.
GL_INVALID_ENUM is generated if internalFormat is not a supported format returned in GL_COMPRESSED_TEXTURE_FORMATS.
GL_INVALID_VALUE is generated if level is less than 0.
GL_INVALID_VALUE may be generated if level is greater than log2 max, where
max is the returned value of GL_MAX_TEXTURE_SIZE when target is GL_TEXTURE_2D or GL_MAX_CUBE_MAP_TEXTURE_SIZE when target is not GL_TEXTURE_2D.
GL_INVALID_VALUE is generated if imageSize is not consistent with the format, dimensions, and
contents of the specified compressed image data.
GL_INVALID_VALUE is generated if border is not 0.
GL_INVALID_VALUE is generated if imageSize is not consistent with the format, dimensions, and
contents of the specified compressed image data.
GL_INVALID_OPERATION is generated if parameter combinations are not supported by the specific
compressed internal format as specified in the specific texture compression extension.
Undefined results, including abnormal program termination, are generated if data is not encoded in a manner consistent with the extension specification defining the internal compression format.
target - Specifies the target texture of the active texture unit.level - Specifies the level-of-detail number. Level 0 is the base image level. Level n is the nth
mipmap reduction image.internalFormat - Specifies the format of the compressed image data stored at address data.width - Specifies the width of the texture image. All implementations support 2D texture images
that are at least 64 texels wide and cube-mapped texture images that are at least 16 texels
wide.height - Specifies the height of the texture image. All implementations support 2D texture images
that are at least 64 texels high and cube-mapped texture images that are at least 16 texels
high.border - Specifies the width of the border. Must be 0.imageSize - Specifies the number of unsigned bytes of image data starting at the address specified by
data.pixels - Specifies a pointer to the compressed image data in memory.public static void glCompressedTexImage2D(int target,
int level,
int internalFormat,
int border,
long imageSize,
com.google.gwt.core.client.JavaScriptObject javaScriptObject)
glCompressedTexImage2D defines a two-dimensional texture image or cube-map texture image using
compressed image data from client memory. The texture image is decoded according to the extension specification
defining the specified internalFormat. OpenGL ES defines no specific compressed texture formats, but does provide
a mechanism to obtain symbolic constants for such formats provided by extensions.
GL_INVALID_ENUM is generated if target is not GL_TEXTURE_2D, GL_TEXTURE_CUBE_MAP_POSITIVE_X, GL_TEXTURE_CUBE_MAP_NEGATIVE_X, GL_TEXTURE_CUBE_MAP_POSITIVE_Y, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, GL_TEXTURE_CUBE_MAP_POSITIVE_Z, or GL_TEXTURE_CUBE_MAP_NEGATIVE_Z.
GL_INVALID_ENUM is generated if internalFormat is not a supported format returned in GL_COMPRESSED_TEXTURE_FORMATS.
GL_INVALID_VALUE is generated if level is less than 0.
GL_INVALID_VALUE may be generated if level is greater than log2 max, where
max is the returned value of GL_MAX_TEXTURE_SIZE when target is GL_TEXTURE_2D or GL_MAX_CUBE_MAP_TEXTURE_SIZE when target is not GL_TEXTURE_2D.
GL_INVALID_VALUE is generated if border is not 0.
GL_INVALID_VALUE is generated if imageSize is not consistent with the format, dimensions, and
contents of the specified compressed image data.
GL_INVALID_OPERATION is generated if parameter combinations are not supported by the specific
compressed internal format as specified in the specific texture compression extension.
Undefined results, including abnormal program termination, are generated if data is not encoded in a manner consistent with the extension specification defining the internal compression format.
target - Specifies the target texture of the active texture unit.level - Specifies the level-of-detail number. Level 0 is the base image level. Level n is the nth
mipmap reduction image.internalFormat - Specifies the format of the compressed image data stored at address data.border - Specifies the width of the border. Must be 0.imageSize - Specifies the number of unsigned bytes of image data starting at the address specified by
data.javaScriptObject - Specifies a pointer to the compressed image data in memory.public static void glCompressedTexSubImage2D(int target,
int level,
int xOffset,
int yOffset,
int format,
long imageSize,
com.google.gwt.user.client.ui.Image image)
glCompressedTexSubImage2D redefines a contiguous subregion of an existing two-dimensional texture
image. The texels referenced by data replace the portion of the existing texture array with x indices xoffset and
xoffset + width - 1, and the y indices yoffset and yoffset + height − 1, inclusive. This region
may not include any texels outside the range of the texture array as it was originally specified. It is not an
error to specify a subtexture with width of 0, but such a specification has no effect.
GL_INVALID_ENUM is generated if target is not GL_TEXTURE_2D, GL_TEXTURE_CUBE_MAP_POSITIVE_X, GL_TEXTURE_CUBE_MAP_NEGATIVE_X, GL_TEXTURE_CUBE_MAP_POSITIVE_Y, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, GL_TEXTURE_CUBE_MAP_POSITIVE_Z, or GL_TEXTURE_CUBE_MAP_NEGATIVE_Z.
GL_INVALID_ENUM is generated if format is not a supported format returned in GL_COMPRESSED_TEXTURE_FORMATS.
GL_INVALID_VALUE is generated if level is less than 0.
GL_INVALID_VALUE may be generated if level is greater than log2max, where max is the
returned value of GL_MAX_TEXTURE_SIZE when target is GL_TEXTURE_2D or GL_MAX_CUBE_MAP_TEXTURE_SIZE when target is not GL_TEXTURE_2D.
GL_INVALID_VALUE is generated if xoffset < 0, (xoffset + width) > w, yoffset <
0, or (yoffset + height) > h, where w is the width and h is the height of the texture image being
modified.
GL_INVALID_VALUE is generated if width or height is less than 0.
GL_INVALID_VALUE is generated if imageSize is not consistent with the format, dimensions, and
contents of the specified compressed image data.
GL_INVALID_OPERATION is generated if the texture array has not been defined by a previous glCompressedTexImage2D(int, int, int, int, long, Image) operation whose internalformat matches the format of
glCompressedTexSubImage2D.
GL_INVALID_OPERATION is generated if parameter combinations are not supported by the specific
compressed internal format as specified in the specific texture compression extension.
Undefined results, including abnormal program termination, are generated if data is not encoded in a manner consistent with the extension specification defining the internal compression format.
target - Specifies the target of the active texture unit.level - Specifies the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap
reduction image.xOffset - Specifies a texel offset in the x direction within the texture array.yOffset - Specifies a texel offset in the y direction within the texture array.format - Specifies the format of the compressed image data stored at address data.imageSize - Specifies the number of unsigned bytes of image data starting at the address specified by data.image - Specifies a pointer to the compressed image data in memory.public static void glCompressedTexSubImage2D(int target,
int level,
int xOffset,
int yOffset,
int format,
long imageSize,
com.google.gwt.core.client.JavaScriptObject data)
glCompressedTexSubImage2D redefines a contiguous subregion of an existing two-dimensional texture
image. The texels referenced by data replace the portion of the existing texture array with x indices xoffset and
xoffset + width - 1, and the y indices yoffset and yoffset + height − 1, inclusive. This region
may not include any texels outside the range of the texture array as it was originally specified. It is not an
error to specify a subtexture with width of 0, but such a specification has no effect.
GL_INVALID_ENUM is generated if target is not GL_TEXTURE_2D, GL_TEXTURE_CUBE_MAP_POSITIVE_X, GL_TEXTURE_CUBE_MAP_NEGATIVE_X, GL_TEXTURE_CUBE_MAP_POSITIVE_Y, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, GL_TEXTURE_CUBE_MAP_POSITIVE_Z, or GL_TEXTURE_CUBE_MAP_NEGATIVE_Z.
GL_INVALID_ENUM is generated if format is not a supported format returned in GL_COMPRESSED_TEXTURE_FORMATS.
GL_INVALID_VALUE is generated if level is less than 0.
GL_INVALID_VALUE may be generated if level is greater than log2max, where max is the
returned value of GL_MAX_TEXTURE_SIZE when target is GL_TEXTURE_2D or GL_MAX_CUBE_MAP_TEXTURE_SIZE when target is not GL_TEXTURE_2D.
GL_INVALID_VALUE is generated if xoffset < 0, (xoffset + width) > w, yoffset <
0, or (yoffset + height) > h, where w is the width and h is the height of the texture image being
modified.
GL_INVALID_VALUE is generated if width or height is less than 0.
GL_INVALID_VALUE is generated if imageSize is not consistent with the format, dimensions, and
contents of the specified compressed image data.
GL_INVALID_OPERATION is generated if the texture array has not been defined by a previous glCompressedTexImage2D(int, int, int, int, long, Image) operation whose internalformat matches the format of
glCompressedTexSubImage2D.
GL_INVALID_OPERATION is generated if parameter combinations are not supported by the specific
compressed internal format as specified in the specific texture compression extension.
Undefined results, including abnormal program termination, are generated if data is not encoded in a manner consistent with the extension specification defining the internal compression format.
target - Specifies the target of the active texture unit.level - Specifies the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap
reduction image.xOffset - Specifies a texel offset in the x direction within the texture array.yOffset - Specifies a texel offset in the y direction within the texture array.format - Specifies the format of the compressed image data stored at address data.imageSize - Specifies the number of unsigned bytes of image data starting at the address specified by data.data - Specifies a pointer to the compressed image data in memory.public static void glCompressedTexSubImage2D(int target,
int level,
int xOffset,
int yOffset,
long width,
long height,
int format,
long imageSize,
com.google.gwt.typedarrays.shared.ArrayBufferView data)
glCompressedTexSubImage2D redefines a contiguous subregion of an existing two-dimensional texture
image. The texels referenced by data replace the portion of the existing texture array with x indices xoffset and
xoffset + width - 1, and the y indices yoffset and yoffset + height − 1, inclusive. This region
may not include any texels outside the range of the texture array as it was originally specified. It is not an
error to specify a subtexture with width of 0, but such a specification has no effect.
GL_INVALID_ENUM is generated if target is not GL_TEXTURE_2D, GL_TEXTURE_CUBE_MAP_POSITIVE_X, GL_TEXTURE_CUBE_MAP_NEGATIVE_X, GL_TEXTURE_CUBE_MAP_POSITIVE_Y, GL_TEXTURE_CUBE_MAP_NEGATIVE_Y, GL_TEXTURE_CUBE_MAP_POSITIVE_Z, or GL_TEXTURE_CUBE_MAP_NEGATIVE_Z.
GL_INVALID_ENUM is generated if format is not a supported format returned in GL_COMPRESSED_TEXTURE_FORMATS.
GL_INVALID_VALUE is generated if level is less than 0.
GL_INVALID_VALUE may be generated if level is greater than log2max, where max is the
returned value of GL_MAX_TEXTURE_SIZE when target is GL_TEXTURE_2D or GL_MAX_CUBE_MAP_TEXTURE_SIZE when target is not GL_TEXTURE_2D.
GL_INVALID_VALUE is generated if xoffset < 0, (xoffset + width) > w, yoffset <
0, or (yoffset + height) > h, where w is the width and h is the height of the texture image being
modified.
GL_INVALID_VALUE is generated if width or height is less than 0.
GL_INVALID_VALUE is generated if imageSize is not consistent with the format, dimensions, and
contents of the specified compressed image data.
GL_INVALID_OPERATION is generated if the texture array has not been defined by a previous glCompressedTexImage2D(int, int, int, int, long, Image) operation whose internalformat matches the format of
glCompressedTexSubImage2D.
GL_INVALID_OPERATION is generated if parameter combinations are not supported by the specific
compressed internal format as specified in the specific texture compression extension.
Undefined results, including abnormal program termination, are generated if data is not encoded in a manner consistent with the extension specification defining the internal compression format.
target - Specifies the target of the active texture unit.level - Specifies the level-of-detail number. Level 0 is the base image level. Level n is the nth mipmap
reduction image.xOffset - Specifies a texel offset in the x direction within the texture array.yOffset - Specifies a texel offset in the y direction within the texture array.width - Specifies the width of the texture subimage.height - Specifies the height of the texture subimage.format - Specifies the format of the compressed image data stored at address data.imageSize - Specifies the number of unsigned bytes of image data starting at the address specified by data.data - Specifies a pointer to the compressed image data in memory.public static void glCopyTexImage2D(int target,
int level,
int internalFormat,
int x,
int y,
long width,
long height,
int border)
public static void glCopyTexSubImage2D(int target,
int level,
int xOffset,
int yOffset,
int x,
int y,
long width,
long height)
public static int glCreateBuffer()
public static int glCreateFramebuffer()
public static int glCreateProgram()
public static int glCreateRenderbuffer()
public static int glCreateShader(int type)
public static int glCreateTexture()
public static void glCullFace(int mode)
public static void glDeleteBuffer(int bufferID)
public static void glDeleteFramebuffer(int frameBufferID)
public static void glDeleteProgram(int programID)
public static void glDeleteRenderbuffer(int renderBufferID)
public static void glDeleteShader(int shaderID)
public static void glDeleteTexture(int textureID)
public static void glDepthFunc(int func)
public static void glDepthMask(boolean flag)
public static void glDepthRange(double nearVal,
double farVal)
public static void glDetachShader(int programID,
int shaderID)
public static void glDisable(int disableCap)
public static void glDisableVertexAttribArray(int index)
public static void glDrawArrays(int mode,
int first,
int count)
public static void glDrawElements(int mode,
int count,
int type,
int offset)
public static void glEnable(int enableCap)
public static void glEnableVertexAttribArray(int index)
public static void glFinish()
public static void glFlush()
public static void glFramebufferRenderbuffer(int target,
int attachment,
int renderbufferTarget,
int renderBuffer)
public static void glFramebufferTexture2D(int target,
int attachment,
int textureTarget,
int texture,
int level)
public static void glFrontFace(int mode)
public static void glGenerateMipmap(int target)
public static WebGL10.ActiveInfo glGetActiveAttrib(int programID, int index)
public static WebGL10.ActiveInfo glGetActiveUniform(int programID, int index)
public static int[] glGetAttachedShaders(int programID)
@WebGLContext.HandlesContextLoss public static int glGetAttribLocation(int programID, java.lang.String name)
public static int glGetBufferParameter(int target,
int pname)
public static com.google.gwt.dom.client.Element glGetCanvas()
@WebGLContext.HandlesContextLoss public static WebGLContext.Attributes glGetContextAttributes()
public static int glGetDrawingBufferHeight()
public static int glGetDrawingBufferWidth()
@WebGLContext.HandlesContextLoss public static int glGetError()
public static com.google.gwt.core.client.JavaScriptObject glGetExtension(java.lang.String name)
public static <T> T glGetFramebufferAttachmentParameter(int target,
int attachment,
int pname)
public static <T> T glGetParameter(int pname)
public static java.lang.String glGetProgramInfoLog(int programID)
public static <T> T glGetProgramParameter(int programID,
int pname)
public static int glGetRenderbufferParameter(int target,
int pname)
public static java.lang.String glGetShaderInfoLog(int shaderID)
public static <T> T glGetShaderParameter(int shaderID,
int pname)
public static WebGL10.ShaderPrecisionFormat glGetShaderPrecisionFormat(int shaderType, int precisionType)
public static java.lang.String glGetShaderSource(int shaderID)
public static java.lang.String[] glGetSupportedExtensions()
public static int glGetTexParameter(int textureTarget,
int pname)
public static <T> T glGetUniform(int program,
int location)
public static int glGetUniformLocation(int programID,
java.lang.String name)
public static <T> T glGetVertexAttrib(int index,
int pname)
@WebGLContext.HandlesContextLoss public static int glGetVertexAttribOffset(int index, int pname)
public static void glHint(int target,
int mode)
@WebGLContext.HandlesContextLoss public static boolean glIsBuffer(int bufferID)
@WebGLContext.HandlesContextLoss public static boolean glIsContextLost()
@WebGLContext.HandlesContextLoss public static boolean glIsEnabled(int enableCap)
@WebGLContext.HandlesContextLoss public static boolean glIsFramebuffer(int framebufferID)
@WebGLContext.HandlesContextLoss public static boolean glIsProgram(int programID)
@WebGLContext.HandlesContextLoss public static boolean glIsRenderbuffer(int renderbufferID)
@WebGLContext.HandlesContextLoss public static boolean glIsShader(int shaderID)
@WebGLContext.HandlesContextLoss public static boolean glIsTexture(int textureID)
public static void glLineWidth(int width)
public static void glLinkProgram(int programID)
public static void glPixelStorei(int pname,
int param)
public static void glPolygonOffset(double factor,
double units)
public static void glReadPixels(int x,
int y,
int w,
int h,
int format,
int type,
com.google.gwt.typedarrays.shared.ArrayBufferView pixels)
public static void glRenderbufferStorage(int target,
int internalFormat,
int width,
int height)
public static void glSampleCoverage(float value,
boolean invert)
public static void glScissor(int x,
int y,
int w,
int h)
public static void glShaderSource(int shaderID,
java.lang.String source)
public static void glStencilFunc(int func,
int ref,
int mask)
public static void glStencilFuncSeparate(int face,
int func,
int ref,
int mask)
public static void glStencilMask(int mask)
public static void glStencilMaskSeparate(int face,
int mask)
public static void glStencilOp(int sFail,
int dpFail,
int dpPass)
public static void glStencilOpSeparate(int face,
int fail,
int zFail,
int zPass)
public static void glTexImage2D(int target,
int level,
int internalFormat,
int format,
int type,
com.google.gwt.user.client.ui.Image pixels)
public static void glTexImage2D(int target,
int level,
int internalFormat,
int format,
int type,
com.google.gwt.canvas.dom.client.ImageData pixels)
public static void glTexImage2D(int target,
int level,
int internalFormat,
int width,
int height,
int border,
int format,
int type,
com.google.gwt.typedarrays.shared.ArrayBufferView pixels)
public static void glTexImage2D(int target,
int level,
int internalFormat,
int format,
int type,
com.google.gwt.core.client.JavaScriptObject pixels)
public static void glTexParameterf(int target,
int pname,
float value)
public static void glTexParameteri(int target,
int pname,
int value)
public static void glTexSubImage2D(int target,
int level,
int xOffset,
int yOffset,
int width,
int height,
int format,
int type,
com.google.gwt.typedarrays.shared.ArrayBufferView pixels)
public static void glTexSubImage2D(int target,
int level,
int xOffset,
int yOffset,
int width,
int height,
int format,
int type,
com.google.gwt.core.client.JavaScriptObject pixels)
public static void glTexSubImage2D(int target,
int level,
int xOffset,
int yOffset,
int width,
int height,
int format,
int type,
com.google.gwt.user.client.ui.Image pixels)
public static void glTexSubImage2D(int target,
int level,
int xOffset,
int yOffset,
int width,
int height,
int format,
int type,
com.google.gwt.canvas.dom.client.ImageData pixels)
public static void glTexSubImage2D(int target,
int level,
int xOffset,
int yOffset,
int width,
int height,
int format,
int type,
com.google.gwt.canvas.client.Canvas pixels)
public static void glUniform1f(int location,
float x)
public static void glUniform1fv(int location,
com.google.gwt.typedarrays.shared.Float32Array x)
public static void glUniform1i(int location,
int x)
public static void glUniform1iv(int location,
com.google.gwt.typedarrays.shared.Int32Array x)
public static void glUniform2f(int location,
float x,
float y)
public static void glUniform2fv(int location,
com.google.gwt.typedarrays.shared.Float32Array xy)
public static void glUniform2i(int location,
int x,
int y)
public static void glUniform2iv(int location,
com.google.gwt.typedarrays.shared.Int32Array xy)
public static void glUniform3f(int location,
float x,
float y,
float z)
public static void glUniform3fv(int location,
com.google.gwt.typedarrays.shared.Float32Array xy)
public static void glUniform3i(int location,
int x,
int y,
int z)
public static void glUniform3iv(int location,
com.google.gwt.typedarrays.shared.Int32Array xy)
public static void glUniform4f(int location,
float x,
float y,
float z,
float w)
public static void glUniform4fv(int location,
com.google.gwt.typedarrays.shared.Float32Array xy)
public static void glUniform4i(int location,
int x,
int y,
int z,
int w)
public static void glUniform4iv(int location,
com.google.gwt.typedarrays.shared.Int32Array xy)
public static void glUniformMatrix2fv(int location,
boolean transpose,
float[] value)
public static void glUniformMatrix2fv(int location,
boolean transpose,
com.google.gwt.typedarrays.shared.Float32Array value)
public static void glUniformMatrix3fv(int location,
boolean transpose,
float[] value)
public static void glUniformMatrix3fv(int location,
boolean transpose,
com.google.gwt.typedarrays.shared.Float32Array value)
public static void glUniformMatrix4fv(int location,
boolean transpose,
float[] value)
public static void glUniformMatrix4fv(int location,
boolean transpose,
com.google.gwt.typedarrays.shared.Float32Array value)
public static void glUseProgram(int programID)
public static void glValidateProgram(int programID)
public static void glVertexAttribPointer(int index,
int size,
int type,
boolean normalized,
long stride,
long offset)
public static void glVertexAttrib1f(int index,
float x)
public static void glVertexAttrib1fv(int index,
com.google.gwt.typedarrays.shared.ArrayBufferView values)
public static void glVertexAttrib1fv(int index,
com.google.gwt.core.client.JavaScriptObject values)
public static void glVertexAttrib1fv(int index,
float[] values)
public static void glVertexAttrib2f(int index,
float x,
float y)
public static void glVertexAttrib2fv(int index,
com.google.gwt.typedarrays.shared.ArrayBufferView values)
public static void glVertexAttrib2fv(int index,
com.google.gwt.core.client.JavaScriptObject values)
public static void glVertexAttrib2fv(int index,
float[] values)
public static void glVertexAttrib3f(int index,
float x,
float y,
float z)
public static void glVertexAttrib3fv(int index,
com.google.gwt.typedarrays.shared.ArrayBufferView values)
public static void glVertexAttrib3fv(int index,
com.google.gwt.core.client.JavaScriptObject values)
public static void glVertexAttrib3fv(int index,
float[] values)
public static void glVertexAttrib4f(int index,
float x,
float y,
float z,
float w)
public static void glVertexAttrib4fv(int index,
com.google.gwt.typedarrays.shared.ArrayBufferView values)
public static void glVertexAttrib4fv(int index,
com.google.gwt.core.client.JavaScriptObject values)
public static void glVertexAttrib4fv(int index,
float[] values)
public static void glViewport(int x,
int y,
int w,
int h)