|
The Java™ Binding for the OpenGL® ES API | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The EGL11 interface contains the Java(TM) programming language bindings for EGL 1.1. It extends the EGL10 interface.
The documentation in this interface 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 EGL specification and relevant extension specifications. EGL documentation is available at the Khronos web site.
Field Summary | |
static int |
EGL_BACK_BUFFER
EGL 1.1 constant. |
static int |
EGL_BIND_TO_TEXTURE_RGB
EGL 1.1 constant. |
static int |
EGL_BIND_TO_TEXTURE_RGBA
EGL 1.1 constant. |
static int |
EGL_CONTEXT_LOST
EGL 1.1 constant. |
static int |
EGL_MAX_SWAP_INTERVAL
EGL 1.1 constant. |
static int |
EGL_MIN_SWAP_INTERVAL
EGL 1.1 constant. |
static int |
EGL_MIPMAP_LEVEL
EGL 1.1 constant. |
static int |
EGL_MIPMAP_TEXTURE
EGL 1.1 constant. |
static int |
EGL_NO_TEXTURE
EGL 1.1 constant. |
static int |
EGL_TEXTURE_2D
EGL 1.1 constant. |
static int |
EGL_TEXTURE_FORMAT
EGL 1.1 constant. |
static int |
EGL_TEXTURE_RGB
EGL 1.1 constant. |
static int |
EGL_TEXTURE_RGBA
EGL 1.1 constant. |
static int |
EGL_TEXTURE_TARGET
EGL 1.1 constant. |
Method Summary | |
boolean |
eglBindTexImage(EGLDisplay display,
EGLSurface surface,
int buffer)
(EGL 1.1 only) Defines a two-dimensional texture image. |
boolean |
eglReleaseTexImage(EGLDisplay display,
EGLSurface surface,
int buffer)
(EGL 1.1 only) Releases a color buffer that is being used as a texture. |
boolean |
eglSurfaceAttrib(EGLDisplay display,
EGLSurface surface,
int attribute,
int value)
(EGL 1.1 only) Set an EGL surface attribute. |
boolean |
eglSwapInterval(EGLDisplay display,
int interval)
(EGL 1.1 only) Specifies the minimum number of video frame periods per buffer swap for the window associated with the current context. |
Methods inherited from interface javax.microedition.khronos.egl.EGL10 |
eglChooseConfig, eglCopyBuffers, eglCreateContext, eglCreatePbufferSurface, eglCreatePixmapSurface, eglCreateWindowSurface, eglDestroyContext, eglDestroySurface, eglGetConfigAttrib, eglGetConfigs, eglGetCurrentContext, eglGetCurrentDisplay, eglGetCurrentSurface, eglGetDisplay, eglGetError, eglInitialize, eglMakeCurrent, eglQueryContext, eglQueryString, eglQuerySurface, eglSwapBuffers, eglTerminate, eglWaitGL, eglWaitNative |
Field Detail |
public static final int EGL_CONTEXT_LOST
public static final int EGL_BIND_TO_TEXTURE_RGB
public static final int EGL_BIND_TO_TEXTURE_RGBA
public static final int EGL_MIN_SWAP_INTERVAL
public static final int EGL_MAX_SWAP_INTERVAL
public static final int EGL_NO_TEXTURE
public static final int EGL_TEXTURE_RGB
public static final int EGL_TEXTURE_RGBA
public static final int EGL_TEXTURE_2D
public static final int EGL_TEXTURE_FORMAT
public static final int EGL_TEXTURE_TARGET
public static final int EGL_MIPMAP_TEXTURE
public static final int EGL_MIPMAP_LEVEL
public static final int EGL_BACK_BUFFER
Method Detail |
public boolean eglSurfaceAttrib(EGLDisplay display, EGLSurface surface, int attribute, int value)
eglSurfaceAttrib
sets the value of
attribute
for surface
to
value
. attribute
can be one of the
following:
EGL_MIPMAP_LEVEL
For mipmap textures, the EGL_MIPMAP_LEVEL
attribute indicates which level of the mipmap should be
rendered. If the value of this attribute is outside the range of
supported mipmap levels, the closest valid mipmap level is
selected for rendering. The default value is 0.
If the value of pbuffer attribute
EGL_TEXTURE_FORMAT
is EGL_NO_TEXTURE
,
if the value of attribute EGL_TEXTURE_TYPE
is
EGL_NO_TEXTURE
, or if surface is not a pbuffer, then
attribute EGL_MIPMAP_LEVEL
may be set, but has no
effect.
false
is returned on failure, true
otherwise.
EGL_BAD_DISPLAY
is generated if
display
is not an EGL display connection.
EGL_NOT_INITIALIZED
is generated if
display
has not been initialized.
EGL_BAD_SURFACE
is generated if
surface
is not an EGL surface.
EGL_BAD_ATTRIBUTE
is generated if
attribute
is not a valid surface attribute.
display
- Specifies the EGL display connection.surface
- Specifies the EGL surface.attribute
- Specifies the EGL surface attribute to set.value
- Specifies the attributes required value.
true
if the operation succeeds.
java.lang.IllegalArgumentException
- if display
is
null
.
java.lang.IllegalArgumentException
- if surface
is
null
.public boolean eglBindTexImage(EGLDisplay display, EGLSurface surface, int buffer)
The texture image consists of the image data in
buffer
for the specified surface
, and
need not be copied.
The texture target, the texture format and the size of the
texture components are derived from attributes of the specified
surface, which must be a pbuffer supporting one of the
EGL_BIND_TO_TEXTURE_RGB
or
EGL_BIND_TO_TEXTURE_RGBA
attributes.
The pbuffer attribute EGL_TEXTURE_FORMAT
determines the base internal format of the texture.
The texture target is derived from the
EGL_TEXTURE_TARGET
attribute of
surface
. If the attribute value is
EGL_TEXTURE_2D
, then buffer defines a texture for
the two-dimensional texture object which is bound to the current
context (hereafter referred to as the current texture object).
If display
and surface
are the
display and surface for the calling thread’s current context,
eglBindTexImage
performs an implicit
glFlush
. For other surfaces,
eglBindTexImage
waits for all effects from
previously issued OpenGL ES commands drawing to the surface to
complete before defining the texture image, as though
glFinish
were called on the last context to which
that surface were bound.
After eglBindTexImage
is called, the specified
surface is no longer available for reading or writing. Any read
operation, such as glReadPixels
or
eglCopyBuffers
, which reads values from any of the
surface’s color buffers or ancillary buffers will produce
indeterminate results. In addition, draw operations that are done
to the surface before its color buffer is released from the
texture produce indeterminate results. Specifically, if the
surface is current to a context and thread then rendering
commands will be processed and the context state will be updated,
but the surface may or may not be written.
Texture mipmap levels are automatically generated when all of
the following conditions are met while calling
eglBindTexImage
:
The EGL_MIPMAP_TEXTURE
attribute of the pbuffer
being bound is EGL_TRUE
.
The OpenGL ES texture parameter
GL_GENERATE_MIPMAP
is GL_TRUE
for the
currently bound texture.
The value of the EGL_MIPMAP_LEVEL
attribute of
the pbuffer being bound is equal to the value of the texture
parameter GL_TEXTURE_BASE_LEVEL
. In this case,
additional mipmap levels are generated as described in section
3.8 of the OpenGL ES 1.1 Specification.
eglSwapBuffers
has no effect if it is called on
a bound surface.
Any existing images associated with the different mipmap
levels of the texture object are freed (it is as if
glTexImage
was called with an image of zero width).
The color buffer is bound to a texture object. If the texture
object is shared between contexts, then the color buffer is also
shared. If a texture object is deleted before
eglReleaseTexImage
is called, then the color buffer
is released and the surface is made available for reading and
writing.
It is not an error to call glTexImage2D
or
glCopyTexImage2D
to replace an image of a texture
object that has a color buffer bound to it. However, these calls
will cause the color buffer to be released back to the surface
and new memory will be allocated for the texture. Note that the
color buffer is released even if the image that is being defined
is a mipmap level that was not defined by the color buffer.
eglBindTexImage
is ignored if there is no
current rendering context.
EGL_BAD_MATCH
is generated if the surface
attribute EGL_TEXTURE_FORMAT
is set to
EGL_NO_TEXTURE
.
EGL_BAD_ACCESS
is generated if
buffer
is already bound to a texture.
EGL_BAD_VALUE
is generated if
buffer
is not a valid buffer (currently only
EGL_BACK_BUFFER
may be specified).
EGL_BAD_SURFACE
is generated if surface is not
an EGL surface, or is not a pbuffer surface supporting texture
binding.
display
- Specifies the EGL display connection.surface
- Specifies the EGL surface.buffer
- Specifies the texture image data.
true
if the operation succeeds.
java.lang.IllegalArgumentException
- if display
is
null
.
java.lang.IllegalArgumentException
- if surface
is
null
.public boolean eglReleaseTexImage(EGLDisplay display, EGLSurface surface, int buffer)
The specified color buffer is released back to the surface. The surface is made available for reading and writing when it no longer has any color buffers bound as textures.
If the specified color buffer is no longer bound to a texture
(e.g., because the texture object was deleted) then
eglReleaseTexImage
has no effect. No error is
generated.
The contents of the color buffer are undefined when it is
first released. In particular, there is no guarantee that the
texture image is still present. However, the contents of other
color buffers are unaffected by this call. Also, the contents of
the depth and stencil buffers are not affected by
eglBindTexImage
and eglReleaseTexImage
.
After a color buffer is released from a texture (either
explicitly by calling eglReleaseTexImage
or
implicitly by calling a routine such as
glTexImage2D
), all texture images that were defined
by the color buffer become NULL (it is as if
glTexImage
was called with an image of zero width).
EGL_BAD_MATCH
is generated if the surface
attribute EGL_TEXTURE_FORMAT
is set to
EGL_NO_TEXTURE
.
EGL_BAD_VALUE
is generated if buffer
is not a valid buffer (currently only
EGL_BACK_BUFFER
may be specified).
EGL_BAD_SURFACE
is generated if
surface
is not an EGL surface, or is not a bound
pbuffer surface.
display
- Specifies the EGL display connection.surface
- Specifies the EGL surface.buffer
- Specifies the texture image data.
true
if the operation succeeds.
java.lang.IllegalArgumentException
- if display
is
null
.
java.lang.IllegalArgumentException
- if surface
is
null
.public boolean eglSwapInterval(EGLDisplay display, int interval)
The interval takes effect when eglSwapBuffers
is
first called subsequent to the eglSwapInterval
call.
The interval specified by the function applies to the draw surface bound to the context that is current on the calling thread.
If interval
is set to a value of 0, buffer swaps
are not synchronized to a video frame, and the swap happens as
soon as the render is complete. interval
is silently
clamped to minimum and maximum implementation dependent
values before being stored; these values are defined by
EGLConfig
attributes
EGL_MIN_SWAP_INTERVAL
and
EGL_MAX_SWAP_INTERVAL
respectively.
The swap interval has no effect on
eglCopyBuffers
.
The default swap interval is 1.
false
is returned on failure, true
otherwise.
EGL_BAD_CONTEXT
is generated if there is no
current context on the calling thread.
EGL_BAD_SURFACE
is generated if there is no
surface bound to the current context.
display
- Specifies the EGL display connection.interval
- Specifies the minimum number of video frames that
are displayed before a buffer swap will occur.
true
if the operation succeeds.
java.lang.IllegalArgumentException
- if display
is
null
.
|
Final Release, Oct 2006 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |