summaryrefslogtreecommitdiffstats
path: root/opengl/libagl
diff options
context:
space:
mode:
authorJean-Baptiste Queru <jbq@google.com>2009-05-20 11:28:04 -0700
committerJean-Baptiste Queru <jbq@google.com>2009-05-20 11:28:04 -0700
commit843ef36f7b96cc19ea7d2996b7c8661b41ec3452 (patch)
tree560e1648c99a93986f8b7deef851ef8bb8029db7 /opengl/libagl
parent358d23017d0d6c4636eb7599ae7a9b48108899a3 (diff)
downloadframeworks_base-843ef36f7b96cc19ea7d2996b7c8661b41ec3452.zip
frameworks_base-843ef36f7b96cc19ea7d2996b7c8661b41ec3452.tar.gz
frameworks_base-843ef36f7b96cc19ea7d2996b7c8661b41ec3452.tar.bz2
donut snapshot
Diffstat (limited to 'opengl/libagl')
-rw-r--r--opengl/libagl/Android.mk2
-rw-r--r--opengl/libagl/egl.cpp68
2 files changed, 45 insertions, 25 deletions
diff --git a/opengl/libagl/Android.mk b/opengl/libagl/Android.mk
index 99efe4c..3ce0414 100644
--- a/opengl/libagl/Android.mk
+++ b/opengl/libagl/Android.mk
@@ -33,6 +33,8 @@ ifneq ($(TARGET_SIMULATOR),true)
endif
LOCAL_SHARED_LIBRARIES := libcutils libutils libpixelflinger
+LOCAL_CFLAGS += -fvisibility=hidden
+
LOCAL_LDLIBS := -lpthread -ldl
LOCAL_MODULE:= libagl
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) {