javax.microedition.khronos.opengles.GL11Ext |
The GL11Ext
interface contains the Java(TM) programming language
bindings for all optional profile extensions to OpenGL(R) ES 1.1.
This interface contains constants and methods associated with the optional
profile extensions for OpenGL ES 1.1. The runtime OpenGL ES engine may or may
not implement any particular extensions defined in the extension pack.
Functions that require a particular extension will throw an
UnsupportedOperationException
if the extension is not available
at runtime.
The OpenGL ES 1.1 optional profile extensions comprise the following:
The documentation in this class is normative with respect to instance variable names and values, method names and signatures, and exception behavior. The remaining documentation is placed here for convenience and does not replace the normative documentation found in the OpenGL ES 1.1 specification and the OpenGL specification versions it references.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int | GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES | Constant for use with glGet (OES_matrix_palette
extension). |
|||||||||
int | GL_MATRIX_INDEX_ARRAY_OES | Constant for use with glEnableClientState and
glDisableClientState (OES_matrix_palette
extension). |
|||||||||
int | GL_MATRIX_INDEX_ARRAY_POINTER_OES | Constant for use with glGetPointer (
OES_matrix_palette extension). |
|||||||||
int | GL_MATRIX_INDEX_ARRAY_SIZE_OES | Constant for use with glGet (OES_matrix_palette
extension). |
|||||||||
int | GL_MATRIX_INDEX_ARRAY_STRIDE_OES | Constant for use with glGet (OES_matrix_palette
extension). |
|||||||||
int | GL_MATRIX_INDEX_ARRAY_TYPE_OES | Constant for use with glGet (OES_matrix_palette
extension). |
|||||||||
int | GL_MATRIX_PALETTE_OES | Constant for use with glMatrixMode (
OES_matrix_palette extension). |
|||||||||
int | GL_MAX_PALETTE_MATRICES_OES | Constant for use with glGet (OES_matrix_palette
extension). |
|||||||||
int | GL_MAX_VERTEX_UNITS_OES | Constant for use with glGet (OES_matrix_palette
extension). |
|||||||||
int | GL_TEXTURE_CROP_RECT_OES | Constant for use with glTexParameter (
OES_draw_texture extension). |
|||||||||
int | GL_WEIGHT_ARRAY_BUFFER_BINDING_OES | Constant for use with glGet (OES_matrix_palette
extension). |
|||||||||
int | GL_WEIGHT_ARRAY_OES | Constant for use with glEnableClientState and
glDisableClientState (OES_matrix_palette
extension). |
|||||||||
int | GL_WEIGHT_ARRAY_POINTER_OES | Constant for use with glGetPointer (
OES_matrix_palette extension). |
|||||||||
int | GL_WEIGHT_ARRAY_SIZE_OES | Constant for use with glGet (OES_matrix_palette
extension). |
|||||||||
int | GL_WEIGHT_ARRAY_STRIDE_OES | Constant for use with glGet (OES_matrix_palette
extension). |
|||||||||
int | GL_WEIGHT_ARRAY_TYPE_OES | Constant for use with glGet (OES_matrix_palette
extension). |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract void |
glCurrentPaletteMatrixOES(int matrixpaletteindex)
(
OES_matrix_palette extension) Defines which of the palette’s
matrices is affected by subsequent matrix operations. | ||||||||||
abstract void |
glDrawTexfOES(float x, float y, float z, float width, float height)
(
OES_draw_texture extension) glDrawTexOES draws a
texture rectangle to the screen. | ||||||||||
abstract void |
glDrawTexfvOES(FloatBuffer coords)
(
OES_draw_texture extension) Floating-point Buffer
version of glDrawTexOES . | ||||||||||
abstract void |
glDrawTexfvOES(float[] coords, int offset)
(
OES_draw_texture extension) Floating-point array version of
glDrawTexOES . | ||||||||||
abstract void |
glDrawTexiOES(int x, int y, int z, int width, int height)
(
OES_draw_texture extension) Integer version of
glDrawTexOES . | ||||||||||
abstract void |
glDrawTexivOES(int[] coords, int offset)
(
OES_draw_texture extension) Integer array version of
glDrawTexOES . | ||||||||||
abstract void |
glDrawTexivOES(IntBuffer coords)
(
OES_draw_texture extension) Integer Buffer version
of glDrawTexOES . | ||||||||||
abstract void |
glDrawTexsOES(short x, short y, short z, short width, short height)
(
OES_draw_texture extension) Short integer version of
glDrawTexOES . | ||||||||||
abstract void |
glDrawTexsvOES(ShortBuffer coords)
(
OES_draw_texture extension) Short integer Buffer
version of glDrawTexOES . | ||||||||||
abstract void |
glDrawTexsvOES(short[] coords, int offset)
(
OES_draw_texture extension) Short integer array version of
glDrawTexOES . | ||||||||||
abstract void |
glDrawTexxOES(int x, int y, int z, int width, int height)
(
OES_draw_texture extension) Fixed-point version of
glDrawTexOES . | ||||||||||
abstract void |
glDrawTexxvOES(int[] coords, int offset)
(
OES_draw_texture extension) Fixed-point array version of
glDrawTexOES . | ||||||||||
abstract void |
glDrawTexxvOES(IntBuffer coords)
(
OES_draw_texture extension) Fixed-point Buffer
version of glDrawTexOES . | ||||||||||
abstract void |
glEnable(int cap)
(1.1 +
OES_matrix_palette extension) Enable server-side GL
capabilities. | ||||||||||
abstract void |
glEnableClientState(int array)
(
OES_matrix_palette extension) Enable client-side capability. | ||||||||||
abstract void |
glLoadPaletteFromModelViewMatrixOES()
(
OES_matrix_palette extension) Copies the current model view
matrix to a matrix in the current matrix palette. | ||||||||||
abstract void |
glMatrixIndexPointerOES(int size, int type, int stride, Buffer pointer)
(
OES_matrix_palette extension) Define an array of matrix
indices. | ||||||||||
abstract void |
glMatrixIndexPointerOES(int size, int type, int stride, int offset)
VBO version of
glMatrixIndexPointerOES . | ||||||||||
abstract void |
glTexParameterfv(int target, int pname, float[] params, int offset)
(
OES_draw_texture extension) Set texture parameters. | ||||||||||
abstract void |
glWeightPointerOES(int size, int type, int stride, int offset)
(
OES_matrix_palette extension) VBO version of
glWeightPointerOES . | ||||||||||
abstract void |
glWeightPointerOES(int size, int type, int stride, Buffer pointer)
(
OES_matrix_palette extension) Define an array of weights. |
Constant for use with glGet
(OES_matrix_palette
extension).
Constant for use with glEnableClientState
and
glDisableClientState
(OES_matrix_palette
extension).
Constant for use with glGetPointer
(
OES_matrix_palette
extension).
Constant for use with glGet
(OES_matrix_palette
extension).
Constant for use with glGet
(OES_matrix_palette
extension).
Constant for use with glGet
(OES_matrix_palette
extension).
Constant for use with glMatrixMode
(
OES_matrix_palette
extension).
Constant for use with glGet
(OES_matrix_palette
extension).
Constant for use with glGet
(OES_matrix_palette
extension).
Constant for use with glTexParameter
(
OES_draw_texture
extension).
Constant for use with glGet
(OES_matrix_palette
extension).
Constant for use with glEnableClientState
and
glDisableClientState
(OES_matrix_palette
extension).
Constant for use with glGetPointer
(
OES_matrix_palette
extension).
Constant for use with glGet
(OES_matrix_palette
extension).
Constant for use with glGet
(OES_matrix_palette
extension).
Constant for use with glGet
(OES_matrix_palette
extension).
(OES_matrix_palette
extension) Defines which of the palette’s
matrices is affected by subsequent matrix operations.
glCurrentPaletteMatrixOES
defines which of the palette’s
matrices is affected by subsequent matrix operations when the current matrix
mode is GL_MATRIX_PALETTE_OES
.
GL_INVALID_VALUE
is generated if index
is not
between 0 and GL_MAX_PALETTE_MATRICES_OES
- 1.
matrixpaletteindex | Specifies the index into the palette's matrices. |
---|
(OES_draw_texture
extension) glDrawTexOES
draws a
texture rectangle to the screen.
x
and y
are given directly in window (viewport)
coordinates.
z
is mapped to window depth Zw
as follows:
If z <= 0 then Zw = n If z >= 1 then Zw = f Otherwise Zw = n + z * (f - n)where n and f are the near and far values of
GL_DEPTH_RANGE
respectively.
width
and height
specify the width and height of
the affected screen rectangle in pixels. These values may be positive or
negative; however if either of these are negative, nothing is drawn.
Calling one of the DrawTex
functions generates a fragment for
each pixel that overlaps the screen rectangle bounded by ( x
,
y
) and (x
+ width
), (y
+
height
). For each generated fragment, the depth is given by Zw
as defined above, and the color by the current color.
Texture coordinates for each texture unit are computed as follows:
Let X
and Y
be the screen x and y coordinates of
each sample point associated with the fragment. Let Wt
and
Ht
be the width and height in texels of the texture currently
bound to the texture unit. (If the texture is a mipmap, let Wt
and Ht
be the dimensions of the level specified by
GL_TEXTURE_BASE_LEVEL
). Let Ucr
, Vcr
,
Wcr
and Hcr
be (respectively) the four integers
that make up the texture crop rectangle parameter for the currently bound
texture. The fragment texture coordinates (s, t, r, q)
are given
by:
s = (Ucr + (X - x) * (Wcr / width)) / Wt t = (Vcr + (Y - y) * (Hcr / height)) / Ht r = 0 q = 1
In the specific case where X
, Y
, x
and
y
are all integers, Wcr
/width
and
Hcr
/height
are both equal to one, the base level is
used for the texture read, and fragments are sampled at pixel centers,
implementations are required to ensure that the resulting u
,
v
texture indices are also integers. This results in a
one-to-one mapping of texels to fragments.
Note that Wcr
and/or Hcr
can be negative. The
formulas given above for s
and t
still apply in
this case. The result is that if Wcr
is negative, the source
rectangle for glDrawTexOES
operations lies to the left of the
reference point (Ucr, Vcr) rather than to the right of it, and appears
right-to-left reversed on the screen after a call to DrawTex
.
Similarly, if Hcr
is negative, the source rectangle lies below
the reference point (Ucr,
Vcr)
rather than above it, and appears upside-down on the screen.
Note also that s
, t
, r
, and
q
are computed for each fragment as part of
glDrawTexOES
rendering. This implies that the texture matrix is
ignored and has no effect on the rendered result.
glDrawTexOES
is available only if the
OES_draw_texture
extension is supported by your implementation.
x | Specifies the x position of the affected screen rectangle. |
---|---|
y | Specifies the x position of the affected screen rectangle. |
z | Specifies the x position of the affected screen rectangle. |
width | Specifies the width of the affected screen rectangle in pixels. |
height | Specifies the height of the affected screen rectangle in pixels. |
(OES_draw_texture
extension) Floating-point Buffer
version of glDrawTexOES
.
IllegalArgumentException | if coords is null or if
coords.remaining() is less than 5.
|
---|
(OES_draw_texture
extension) Floating-point array version of
glDrawTexOES
.
coords | An array of at least 5 elements containing the x, y, z, width and height values. |
---|---|
offset | the starting offset within the coords array. |
IllegalArgumentException | if offset is less than 0. |
---|---|
IllegalArgumentException | if coords is null or if
coords.length - offset is less than 5.
|
(OES_draw_texture
extension) Integer version of
glDrawTexOES
.
(OES_draw_texture
extension) Integer array version of
glDrawTexOES
.
IllegalArgumentException | if offset is less than 0. |
---|---|
IllegalArgumentException | if coords is null or if
coords.length - offset is less than 5.
|
(OES_draw_texture
extension) Integer Buffer
version
of glDrawTexOES
.
IllegalArgumentException | if coords is null or if
coords.remaining() is less than 5.
|
---|
(OES_draw_texture
extension) Short integer version of
glDrawTexOES
.
(OES_draw_texture
extension) Short integer Buffer
version of glDrawTexOES
.
IllegalArgumentException | if coords is null or if
coords.remaining() is less than 5.
|
---|
(OES_draw_texture
extension) Short integer array version of
glDrawTexOES
.
IllegalArgumentException | if offset is less than 0. |
---|---|
IllegalArgumentException | if coords is null or if
coords.length - offset is less than 5.
|
(OES_draw_texture
extension) Fixed-point version of
glDrawTexOES
.
(OES_draw_texture
extension) Fixed-point array version of
glDrawTexOES
.
IllegalArgumentException | if offset is less than 0. |
---|---|
IllegalArgumentException | if coords is null or if
coords.length - offset is less than 5.
|
(OES_draw_texture
extension) Fixed-point Buffer
version of glDrawTexOES
.
IllegalArgumentException | if coords is null or if
coords.remaining() is less than 5.
|
---|
(1.1 + OES_matrix_palette
extension) Enable server-side GL
capabilities.
The matrix palette extension is enabled if cap
assumes the value
GL_MATRIX_PALETTE_OES
. See glMatrixMode
.
(OES_matrix_palette
extension) Enable client-side capability.
The OES_matrix_palette
extension adds three additional values
for array
:
GL_MATRIX_INDEX_ARRAY_OES
If enabled, the matrix index array is enabled. See
glMatrixIndexPointer
.
GL_WEIGHT_ARRAY_OES
If enabled, the weight array is enabled. See glWeightPointer
.
(OES_matrix_palette
extension) Copies the current model view
matrix to a matrix in the current matrix palette.
glLoadPaletteFromModelViewMatrixOES
copies the current model
view matrix to a matrix in the current matrix palette, as specified by
glCurrentPaletteMatrix.
(OES_matrix_palette
extension) Define an array of matrix
indices.
glMatrixIndexPointer
specifies the location and data of an array
of matrix indices to use when rendering. size
specifies the
number of matrix indices per vertex and type
the data type of
the coordinates. stride
specifies the byte stride from one
matrix index to the next, allowing vertices and attributes to be packed into
a single array or stored in separate arrays. (Single-array storage may be
more efficient on some implementations.)
These matrices indices are used to blend corresponding matrices for a given vertex.
When a matrix index array is specified, size
, type
,
stride
, and pointer
are saved as client-side state.
If the matrix index array is enabled, it is used when
glDrawArrays
, or glDrawElements
is called. To
enable and disable the vertex array, call glEnableClientState
and glDisableClientState
with the argument
GL_MATRIX_INDEX_ARRAY_OES
. The matrix index array is initially
disabled and isn't accessed when glDrawArrays
or
glDrawElements
is called.
Use glDrawArrays
to construct a sequence of primitives (all of
the same type) from prespecified vertex and vertex attribute arrays. Use
glDrawElements
to construct a sequence of primitives by indexing
vertices and vertex attributes.
glMatrixIndexPointer
is typically implemented on the client
side.
GL_INVALID_VALUE
is generated if size
is greater
than GL_MAX_VERTEX_UNITS_OES
.
GL_INVALID_ENUM
is generated if type
is is not an
accepted value.
GL_INVALID_VALUE
is generated if stride
is
negative.
size | Specifies the number of matrix indices per vertex. Must be is less
than or equal to GL_MAX_VERTEX_UNITS_OES . The initial
value is 0. |
---|---|
type | Specifies the data type of each matrix index in the array.
Symbolic constant GL_UNSIGNED_BYTE is accepted. The
initial value is GL_UNSIGNED_BYTE . |
stride | Specifies the byte offset between consecutive matrix indices. If stride is 0, the matrix indices are understood to be tightly packed in the array. The initial value is 0. |
pointer | Specifies a buffer containing the first matrix index of the first vertex in the array. The initial value is 0. |
IllegalArgumentException | if pointer is null . |
---|---|
IllegalStateException | if VBOs are enabled. |
VBO version of glMatrixIndexPointerOES
.
IllegalStateException | if VBOs are not enabled. |
---|
(OES_draw_texture
extension) Set texture parameters.
The OES_draw_texture
extension adds an additoanl value for
pname
, GL_TEXTURE_CROP_RECT_OES
, which sets the
texture cropping rectangle for use by glDrawTexOES
.
(OES_matrix_palette
extension) VBO version of
glWeightPointerOES
.
IllegalStateException | if VBOs are not enabled. |
---|
(OES_matrix_palette
extension) Define an array of weights.
glWeightPointer
specifies the location and data of an array of
weights to use when rendering. size
specifies the number of
weights per vertex and type
the data type of the coordinates.
stride
specifies the byte stride from one weight to the next
allowing vertices and attributes to be packed into a single array or stored
in separate arrays. (Single-array storage may be more efficient on some
implementations.)
These weights are used to blend corresponding matrices for a given vertex.
When a weight array is specified, size
, type
,
stride
, and pointer
are saved as client-side state.
If the weight array is enabled, it is used when glDrawArrays
,
or glDrawElements
is called. To enable and disable the vertex
array, call glEnableClientState
and
glDisableClientState
with the argument
GL_WEIGHT_ARRAY_OES
. The weight array is initially disabled and
isn't accessed when glDrawArrays
or glDrawElements
is called.
Use glDrawArrays
to construct a sequence of primitives (all of
the same type) from prespecified vertex and vertex attribute arrays. Use
glDrawElements
to construct a sequence of primitives by indexing
vertices and vertex attributes.
glWeightPointer
is typically implemented on the client side.
GL_INVALID_VALUE
is generated if size
is greater
than GL_MAX_VERTEX_UNITS_OES
.
GL_INVALID_ENUM
is generated if type
is is not an
accepted value.
GL_INVALID_VALUE
is generated if stride
is
negative.
size | Specifies the number of weights per vertex. Must be is less than
or equal to GL_MAX_VERTEX_UNITS_OES . The initial
value is 0. |
---|---|
type | Specifies the data type of each weight in the array. Symbolic
constant GL_FIXED is accepted. However, the common
profile also accepts the symbolic constant GL_FLOAT
as well. The initial value is GL_FIXED for the common
lite profile, or GL_FLOAT for the common profile. |
stride | Specifies the byte offset between consecutive weights. If
stride is 0, the weights are understood to be tightly
packed in the array. The initial value is 0. |
pointer | Specifies a Buffer containing the weights of each
vertex in the array. The initial value is 0. |
IllegalArgumentException | if pointer is null . |
---|---|
IllegalStateException | if VBOs are enabled. |