summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2011-08-18 16:26:21 -0700
committerMathias Agopian <mathias@google.com>2011-08-18 16:26:21 -0700
commitf319e2f2ebda579d5c1d94ba24f650d362aacb9c (patch)
treeccab8ab141098350e220cc8fb587b958a3726a2d
parent8618ebcc5d20a5983da1fc6200d50c3662aca6e3 (diff)
downloadframeworks_base-f319e2f2ebda579d5c1d94ba24f650d362aacb9c.zip
frameworks_base-f319e2f2ebda579d5c1d94ba24f650d362aacb9c.tar.gz
frameworks_base-f319e2f2ebda579d5c1d94ba24f650d362aacb9c.tar.bz2
implement EGL_TEXTURE_EXTERNAL_OES in libagl
this allows the emulator to display some graphics Change-Id: Ib4671ad70b8df598d02307f2b9c5b843421cea25
-rw-r--r--opengl/libagl/state.cpp3
-rw-r--r--opengl/libagl/texture.cpp8
2 files changed, 7 insertions, 4 deletions
diff --git a/opengl/libagl/state.cpp b/opengl/libagl/state.cpp
index 8b4136a..90e9612 100644
--- a/opengl/libagl/state.cpp
+++ b/opengl/libagl/state.cpp
@@ -191,6 +191,9 @@ static void enable_disable(ogles_context_t* c, GLenum cap, int enabled)
// these need to fall through into the rasterizer
c->rasterizer.procs.enableDisable(c, cap, enabled);
break;
+ case GL_TEXTURE_EXTERNAL_OES:
+ c->rasterizer.procs.enableDisable(c, GL_TEXTURE_2D, enabled);
+ break;
case GL_MULTISAMPLE:
case GL_SAMPLE_ALPHA_TO_COVERAGE:
diff --git a/opengl/libagl/texture.cpp b/opengl/libagl/texture.cpp
index 8eb17c4..88e8651 100644
--- a/opengl/libagl/texture.cpp
+++ b/opengl/libagl/texture.cpp
@@ -633,7 +633,7 @@ void generateMipmap(ogles_context_t* c, GLint level)
static void texParameterx(
GLenum target, GLenum pname, GLfixed param, ogles_context_t* c)
{
- if (target != GL_TEXTURE_2D) {
+ if (target != GL_TEXTURE_2D && target != GL_TEXTURE_EXTERNAL_OES) {
ogles_error(c, GL_INVALID_ENUM);
return;
}
@@ -866,7 +866,7 @@ void glActiveTexture(GLenum texture)
void glBindTexture(GLenum target, GLuint texture)
{
ogles_context_t* c = ogles_context_t::get();
- if (target != GL_TEXTURE_2D) {
+ if (target != GL_TEXTURE_2D && target != GL_TEXTURE_EXTERNAL_OES) {
ogles_error(c, GL_INVALID_ENUM);
return;
}
@@ -1012,7 +1012,7 @@ void glTexParameteriv(
GLenum target, GLenum pname, const GLint* params)
{
ogles_context_t* c = ogles_context_t::get();
- if (target != GGL_TEXTURE_2D) {
+ if (target != GL_TEXTURE_2D && target != GL_TEXTURE_EXTERNAL_OES) {
ogles_error(c, GL_INVALID_ENUM);
return;
}
@@ -1605,7 +1605,7 @@ void glDrawTexxOES(GLfixed x, GLfixed y, GLfixed z, GLfixed w, GLfixed h) {
void glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image)
{
ogles_context_t* c = ogles_context_t::get();
- if (target != GL_TEXTURE_2D) {
+ if (target != GL_TEXTURE_2D && target != GL_TEXTURE_EXTERNAL_OES) {
ogles_error(c, GL_INVALID_ENUM);
return;
}