/*
* Copyright 1990-2007 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version
* 2 only, as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License version 2 for more details (a copy is
* included at /legal/license.txt).
*
* You should have received a copy of the GNU General Public License
* version 2 along with this work; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
* Clara, CA 95054 or visit www.sun.com if you need additional
* information or have any questions.
*/
package javax.microedition.khronos.egl;
/**
* The EGL11 interface contains the Java(TM) programming language
* bindings for EGL 1.1. It extends the EGL10 interface.
*
* <p> 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 <a
* href="http://www.khronos.org/opengles/spec">Khronos</a> web site.
*/
public interface EGL11 extends EGL10 {
/** EGL 1.1 constant. */
public static final int EGL_CONTEXT_LOST = 0x300E;
/** EGL 1.1 constant. */
public static final int EGL_BIND_TO_TEXTURE_RGB = 0x3039;
/** EGL 1.1 constant. */
public static final int EGL_BIND_TO_TEXTURE_RGBA = 0x303A;
/** EGL 1.1 constant. */
public static final int EGL_MIN_SWAP_INTERVAL = 0x303B;
/** EGL 1.1 constant. */
public static final int EGL_MAX_SWAP_INTERVAL = 0x303C;
/** EGL 1.1 constant. */
public static final int EGL_NO_TEXTURE = 0x305C;
/** EGL 1.1 constant. */
public static final int EGL_TEXTURE_RGB = 0x305D;
/** EGL 1.1 constant. */
public static final int EGL_TEXTURE_RGBA = 0x305E;
/** EGL 1.1 constant. */
public static final int EGL_TEXTURE_2D = 0x305F;
// Surface attributes
/** EGL 1.1 constant. */
public static final int EGL_TEXTURE_FORMAT = 0x3080;
/** EGL 1.1 constant. */
public static final int EGL_TEXTURE_TARGET = 0x3081;
/** EGL 1.1 constant. */
public static final int EGL_MIPMAP_TEXTURE = 0x3082;
/** EGL 1.1 constant. */
public static final int EGL_MIPMAP_LEVEL = 0x3083;
// BindTexImage / ReleaseTexImage buffer target
/** EGL 1.1 constant. */
public static final int EGL_BACK_BUFFER = 0x3084;
/**
* (EGL 1.1 only) Set an EGL surface attribute.
*
* <p><code>eglSurfaceAttrib</code> sets the value of
* <code>attribute</code> for <code>surface</code> to
* <code>value</code>. <code>attribute</code> can be one of the
* following:
*
* <ul>
*
* <li><code>EGL_MIPMAP_LEVEL</code></li>
*
* <p>For mipmap textures, the <code>EGL_MIPMAP_LEVEL</code>
* 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.
*
* </ul>
*
* <h4>Notes</h4>
*
* <p>If the value of pbuffer attribute
* <code>EGL_TEXTURE_FORMAT</code> is <code>EGL_NO_TEXTURE</code>,
* if the value of attribute <code>EGL_TEXTURE_TYPE</code> is
* <code>EGL_NO_TEXTURE</code>, or if surface is not a pbuffer, then
* attribute <code>EGL_MIPMAP_LEVEL</code> may be set, but has no
* effect.
*
* <h4>Errors</h4>
*
* <p><code>false</code> is returned on failure, <code>true</code>
* otherwise.
*
* <p><code>EGL_BAD_DISPLAY</code> is generated if
* <code>display</code> is not an EGL display connection.
*
* <p><code>EGL_NOT_INITIALIZED</code> is generated if
* <code>display</code> has not been initialized.
*
* <p><code>EGL_BAD_SURFACE</code> is generated if
* <code>surface</code> is not an EGL surface.
*
* <p><code>EGL_BAD_ATTRIBUTE</code> is generated if
* <code>attribute</code> is not a valid surface attribute.
*
* @param display Specifies the EGL display connection.
* @param surface Specifies the EGL surface.
* @param attribute Specifies the EGL surface attribute to set.
* @param value Specifies the attributes required value.
*
* @exception IllegalArgumentException if <code>display</code> is
* <code>null</code>.
* @exception IllegalArgumentException if <code>surface</code> is
* <code>null</code>.
*
* @return <code>true</code> if the operation succeeds.
*/
boolean eglSurfaceAttrib(EGLDisplay display,
EGLSurface surface,
int attribute,
int value);
/**
* (EGL 1.1 only) Defines a two-dimensional texture image.
*
* <p>The texture image consists of the image data in
* <code>buffer</code> for the specified <code>surface</code>, and
* need not be copied.
*
* <p>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
* <code>EGL_BIND_TO_TEXTURE_RGB</code> or
* <code>EGL_BIND_TO_TEXTURE_RGBA</code> attributes.
*
* <p>The pbuffer attribute <code>EGL_TEXTURE_FORMAT</code>
* determines the base internal format of the texture.
*
* <p>The texture target is derived from the
* <code>EGL_TEXTURE_TARGET</code> attribute of
* <code>surface</code>. If the attribute value is
* <code>EGL_TEXTURE_2D</code>, 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).
*
* <p>If <code>display</code> and <code>surface</code> are the
* display and surface for the calling thread |