summaryrefslogtreecommitdiffstats
path: root/opengl/libagl/egl.cpp
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2009-04-22 18:24:18 -0700
committerMathias Agopian <mathias@google.com>2009-04-23 13:45:48 -0700
commit53238bddeab7b4633bfdb59fac67b0af1211955a (patch)
tree2758d4cb9019c27a8ab570bbb9755c6f46242f17 /opengl/libagl/egl.cpp
parent91a678088520abf63c1484d284629833877ff938 (diff)
downloadframeworks_native-53238bddeab7b4633bfdb59fac67b0af1211955a.zip
frameworks_native-53238bddeab7b4633bfdb59fac67b0af1211955a.tar.gz
frameworks_native-53238bddeab7b4633bfdb59fac67b0af1211955a.tar.bz2
integrate some OpenGL ES changes back from master_gl in preparation of opening GLES to the NDK.
Diffstat (limited to 'opengl/libagl/egl.cpp')
-rw-r--r--opengl/libagl/egl.cpp68
1 files changed, 43 insertions, 25 deletions
diff --git a/opengl/libagl/egl.cpp b/opengl/libagl/egl.cpp
index 3b4c041..c44478d 100644
--- a/opengl/libagl/egl.cpp
+++ b/opengl/libagl/egl.cpp
@@ -1,17 +1,17 @@
-/*
+/*
**
** Copyright 2007 The Android Open Source Project
**
-** Licensed under the Apache License Version 2.0(the "License");
-** you may not use this file except in compliance with the License.
-** You may obtain a copy of the License at
+** Licensed under the Apache License Version 2.0(the "License");
+** you may not use this file except in compliance with the License.
+** You may obtain a copy of the License at
**
-** http://www.apache.org/licenses/LICENSE-2.0
+** http://www.apache.org/licenses/LICENSE-2.0
**
-** Unless required by applicable law or agreed to in writing software
-** distributed under the License is distributed on an "AS IS" BASIS
-** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND either express or implied.
-** See the License for the specific language governing permissions and
+** Unless required by applicable law or agreed to in writing software
+** distributed under the License is distributed on an "AS IS" BASIS
+** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND either express or implied.
+** See the License for the specific language governing permissions and
** limitations under the License.
*/
@@ -478,22 +478,38 @@ struct extention_map_t {
};
static const extention_map_t gExtentionMap[] = {
- { "glDrawTexsOES", (void(*)())&glDrawTexsOES },
- { "glDrawTexiOES", (void(*)())&glDrawTexiOES },
- { "glDrawTexfOES", (void(*)())&glDrawTexfOES },
- { "glDrawTexxOES", (void(*)())&glDrawTexxOES },
- { "glDrawTexsvOES", (void(*)())&glDrawTexsvOES },
- { "glDrawTexivOES", (void(*)())&glDrawTexivOES },
- { "glDrawTexfvOES", (void(*)())&glDrawTexfvOES },
- { "glDrawTexxvOES", (void(*)())&glDrawTexxvOES },
- { "glQueryMatrixxOES", (void(*)())&glQueryMatrixxOES },
- { "glClipPlanef", (void(*)())&glClipPlanef },
- { "glClipPlanex", (void(*)())&glClipPlanex },
- { "glBindBuffer", (void(*)())&glBindBuffer },
- { "glBufferData", (void(*)())&glBufferData },
- { "glBufferSubData", (void(*)())&glBufferSubData },
- { "glDeleteBuffers", (void(*)())&glDeleteBuffers },
- { "glGenBuffers", (void(*)())&glGenBuffers },
+ { "glDrawTexsOES",
+ (__eglMustCastToProperFunctionPointerType)&glDrawTexsOES },
+ { "glDrawTexiOES",
+ (__eglMustCastToProperFunctionPointerType)&glDrawTexiOES },
+ { "glDrawTexfOES",
+ (__eglMustCastToProperFunctionPointerType)&glDrawTexfOES },
+ { "glDrawTexxOES",
+ (__eglMustCastToProperFunctionPointerType)&glDrawTexxOES },
+ { "glDrawTexsvOES",
+ (__eglMustCastToProperFunctionPointerType)&glDrawTexsvOES },
+ { "glDrawTexivOES",
+ (__eglMustCastToProperFunctionPointerType)&glDrawTexivOES },
+ { "glDrawTexfvOES",
+ (__eglMustCastToProperFunctionPointerType)&glDrawTexfvOES },
+ { "glDrawTexxvOES",
+ (__eglMustCastToProperFunctionPointerType)&glDrawTexxvOES },
+ { "glQueryMatrixxOES",
+ (__eglMustCastToProperFunctionPointerType)&glQueryMatrixxOES },
+ { "glClipPlanef",
+ (__eglMustCastToProperFunctionPointerType)&glClipPlanef },
+ { "glClipPlanex",
+ (__eglMustCastToProperFunctionPointerType)&glClipPlanex },
+ { "glBindBuffer",
+ (__eglMustCastToProperFunctionPointerType)&glBindBuffer },
+ { "glBufferData",
+ (__eglMustCastToProperFunctionPointerType)&glBufferData },
+ { "glBufferSubData",
+ (__eglMustCastToProperFunctionPointerType)&glBufferSubData },
+ { "glDeleteBuffers",
+ (__eglMustCastToProperFunctionPointerType)&glDeleteBuffers },
+ { "glGenBuffers",
+ (__eglMustCastToProperFunctionPointerType)&glGenBuffers },
};
/*
@@ -1299,6 +1315,8 @@ EGLBoolean eglMakeCurrent( EGLDisplay dpy, EGLSurface draw,
}
}
+ // TODO: call connect / disconnect on the surface
+
ogles_context_t* gl = (ogles_context_t*)ctx;
if (makeCurrent(gl) == 0) {
if (ctx) {