01: /*
02: * Copyright 1990-2007 Sun Microsystems, Inc. All Rights Reserved.
03: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
04: *
05: * This program is free software; you can redistribute it and/or
06: * modify it under the terms of the GNU General Public License version
07: * 2 only, as published by the Free Software Foundation.
08: *
09: * This program is distributed in the hope that it will be useful, but
10: * WITHOUT ANY WARRANTY; without even the implied warranty of
11: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12: * General Public License version 2 for more details (a copy is
13: * included at /legal/license.txt).
14: *
15: * You should have received a copy of the GNU General Public License
16: * version 2 along with this work; if not, write to the Free Software
17: * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
18: * 02110-1301 USA
19: *
20: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
21: * Clara, CA 95054 or visit www.sun.com if you need additional
22: * information or have any questions.
23: */
24:
25: package javax.microedition.khronos.egl;
26:
27: import com.sun.jsr239.*;
28:
29: class EGL11Impl extends EGL10Impl implements EGL11 {
30:
31: public synchronized boolean eglSurfaceAttrib(EGLDisplay display,
32: EGLSurface surface, int attribute, int value) {
33: if (display == null) {
34: throw new IllegalArgumentException(Errors.EGL_DISPLAY_NULL);
35: }
36: if (surface == null) {
37: throw new IllegalArgumentException(Errors.EGL_SURFACE_NULL);
38: }
39:
40: return EGL_TRUE == _eglSurfaceAttrib(((EGLDisplayImpl) display)
41: .nativeId(), ((EGLSurfaceImpl) surface).nativeId(),
42: attribute, value);
43: }
44:
45: public synchronized boolean eglBindTexImage(EGLDisplay display,
46: EGLSurface surface, int buffer) {
47: if (display == null) {
48: throw new IllegalArgumentException(Errors.EGL_DISPLAY_NULL);
49: }
50: if (surface == null) {
51: throw new IllegalArgumentException(Errors.EGL_SURFACE_NULL);
52: }
53:
54: return EGL_TRUE == _eglBindTexImage(((EGLDisplayImpl) display)
55: .nativeId(), ((EGLSurfaceImpl) surface).nativeId(),
56: buffer);
57: }
58:
59: public synchronized boolean eglReleaseTexImage(EGLDisplay display,
60: EGLSurface surface, int buffer) {
61: if (display == null) {
62: throw new IllegalArgumentException(Errors.EGL_DISPLAY_NULL);
63: }
64: if (surface == null) {
65: throw new IllegalArgumentException(Errors.EGL_SURFACE_NULL);
66: }
67:
68: return EGL_TRUE == _eglReleaseTexImage(
69: ((EGLDisplayImpl) display).nativeId(),
70: ((EGLSurfaceImpl) surface).nativeId(), buffer);
71: }
72:
73: public synchronized boolean eglSwapInterval(EGLDisplay display,
74: int interval) {
75: if (display == null) {
76: throw new IllegalArgumentException(Errors.EGL_DISPLAY_NULL);
77: }
78:
79: return EGL_TRUE == _eglSwapInterval(((EGLDisplayImpl) display)
80: .nativeId(), interval);
81: }
82:
83: public EGL11Impl() {
84: }
85: }
|