summaryrefslogtreecommitdiffstats
path: root/opengl/tools/glgen/stubs/jsr239
diff options
context:
space:
mode:
authorJack Palevich <jackpal@google.com>2009-05-07 09:52:14 -0700
committerJack Palevich <jackpal@google.com>2009-05-07 10:52:18 -0700
commit593f203ba3df251b238409bb3fcc66b0a90b856d (patch)
tree9ff7ea8e1feb43e181d4ca0d02fea1bd73d018ac /opengl/tools/glgen/stubs/jsr239
parentb112d3af9cc3c14a057988fa23af4f04ae8ebf2d (diff)
downloadframeworks_native-593f203ba3df251b238409bb3fcc66b0a90b856d.zip
frameworks_native-593f203ba3df251b238409bb3fcc66b0a90b856d.tar.gz
frameworks_native-593f203ba3df251b238409bb3fcc66b0a90b856d.tar.bz2
Fix automatically generated code for glGet
Remove include of an internal agl header file. We should not depend on any implementation details of our software renderer, since they may not be correct if another renderer is used. Fix glGet number-of-elements logic for GL_FOG_COLOR GL_LIGHT_MODEL_AMBIENT, and GL_COMPRESSED_TEXTURE_FORMATS.
Diffstat (limited to 'opengl/tools/glgen/stubs/jsr239')
-rw-r--r--opengl/tools/glgen/stubs/jsr239/GLCHeader.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/opengl/tools/glgen/stubs/jsr239/GLCHeader.cpp b/opengl/tools/glgen/stubs/jsr239/GLCHeader.cpp
index 4636081..8f174c7 100644
--- a/opengl/tools/glgen/stubs/jsr239/GLCHeader.cpp
+++ b/opengl/tools/glgen/stubs/jsr239/GLCHeader.cpp
@@ -21,11 +21,7 @@
#include <assert.h>
#include <GLES/gl.h>
-
-#include <private/opengles/gl_context.h>
-
-#define _NUM_COMPRESSED_TEXTURE_FORMATS \
- (::android::OGLES_NUM_COMPRESSED_TEXTURE_FORMATS)
+#include <GLES/glext.h>
static int initialized = 0;
@@ -66,7 +62,6 @@ nativeClassInitBuffer(JNIEnv *_env)
_env->GetFieldID(bufferClass, "_elementSizeShift", "I");
}
-
static void
nativeClassInit(JNIEnv *_env, jclass glImplClass)
{
@@ -117,7 +112,6 @@ getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining)
return (void *) ((char *) data + offset);
}
-
static void
releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit)
{
@@ -125,5 +119,12 @@ releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit)
commit ? 0 : JNI_ABORT);
}
+static int
+getNumCompressedTextureFormats() {
+ int numCompressedTextureFormats = 0;
+ glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &numCompressedTextureFormats);
+ return numCompressedTextureFormats;
+}
+
// --------------------------------------------------------------------------