Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2108e5c7 authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change 1163 into donut

* changes:
  Fix automatically generated code for glGet
parents b1a7ffef be509c9c
Loading
Loading
Loading
Loading
+34 −21
Original line number Diff line number Diff line
@@ -22,11 +22,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;

@@ -67,7 +63,6 @@ nativeClassInitBuffer(JNIEnv *_env)
        _env->GetFieldID(bufferClass, "_elementSizeShift", "I");
}


static void
nativeClassInit(JNIEnv *_env, jclass glImplClass)
{
@@ -118,7 +113,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)
{
@@ -126,6 +120,13 @@ 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;
}

// --------------------------------------------------------------------------

/* void glActiveTexture ( GLenum texture ) */
@@ -1022,6 +1023,12 @@ android_glGetIntegerv__I_3II
#if defined(GL_IMPLEMENTATION_COLOR_READ_TYPE_OES)
        case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
#endif // defined(GL_IMPLEMENTATION_COLOR_READ_TYPE_OES)
#if defined(GL_LIGHT_MODEL_COLOR_CONTROL)
        case GL_LIGHT_MODEL_COLOR_CONTROL:
#endif // defined(GL_LIGHT_MODEL_COLOR_CONTROL)
#if defined(GL_LIGHT_MODEL_LOCAL_VIEWER)
        case GL_LIGHT_MODEL_LOCAL_VIEWER:
#endif // defined(GL_LIGHT_MODEL_LOCAL_VIEWER)
#if defined(GL_LIGHT_MODEL_TWO_SIDE)
        case GL_LIGHT_MODEL_TWO_SIDE:
#endif // defined(GL_LIGHT_MODEL_TWO_SIDE)
@@ -1236,6 +1243,12 @@ android_glGetIntegerv__I_3II
#if defined(GL_COLOR_WRITEMASK)
        case GL_COLOR_WRITEMASK:
#endif // defined(GL_COLOR_WRITEMASK)
#if defined(GL_FOG_COLOR)
        case GL_FOG_COLOR:
#endif // defined(GL_FOG_COLOR)
#if defined(GL_LIGHT_MODEL_AMBIENT)
        case GL_LIGHT_MODEL_AMBIENT:
#endif // defined(GL_LIGHT_MODEL_AMBIENT)
#if defined(GL_SCISSOR_BOX)
        case GL_SCISSOR_BOX:
#endif // defined(GL_SCISSOR_BOX)
@@ -1267,13 +1280,7 @@ android_glGetIntegerv__I_3II
#if defined(GL_COMPRESSED_TEXTURE_FORMATS)
        case GL_COMPRESSED_TEXTURE_FORMATS:
#endif // defined(GL_COMPRESSED_TEXTURE_FORMATS)
#if defined(GL_FOG_COLOR)
        case GL_FOG_COLOR:
#endif // defined(GL_FOG_COLOR)
#if defined(GL_LIGHT_MODEL_AMBIENT)
        case GL_LIGHT_MODEL_AMBIENT:
#endif // defined(GL_LIGHT_MODEL_AMBIENT)
            _needed = _NUM_COMPRESSED_TEXTURE_FORMATS;
            _needed = getNumCompressedTextureFormats();
            break;
        default:
            _needed = 0;
@@ -1378,6 +1385,12 @@ android_glGetIntegerv__ILjava_nio_IntBuffer_2
#if defined(GL_IMPLEMENTATION_COLOR_READ_TYPE_OES)
        case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
#endif // defined(GL_IMPLEMENTATION_COLOR_READ_TYPE_OES)
#if defined(GL_LIGHT_MODEL_COLOR_CONTROL)
        case GL_LIGHT_MODEL_COLOR_CONTROL:
#endif // defined(GL_LIGHT_MODEL_COLOR_CONTROL)
#if defined(GL_LIGHT_MODEL_LOCAL_VIEWER)
        case GL_LIGHT_MODEL_LOCAL_VIEWER:
#endif // defined(GL_LIGHT_MODEL_LOCAL_VIEWER)
#if defined(GL_LIGHT_MODEL_TWO_SIDE)
        case GL_LIGHT_MODEL_TWO_SIDE:
#endif // defined(GL_LIGHT_MODEL_TWO_SIDE)
@@ -1592,6 +1605,12 @@ android_glGetIntegerv__ILjava_nio_IntBuffer_2
#if defined(GL_COLOR_WRITEMASK)
        case GL_COLOR_WRITEMASK:
#endif // defined(GL_COLOR_WRITEMASK)
#if defined(GL_FOG_COLOR)
        case GL_FOG_COLOR:
#endif // defined(GL_FOG_COLOR)
#if defined(GL_LIGHT_MODEL_AMBIENT)
        case GL_LIGHT_MODEL_AMBIENT:
#endif // defined(GL_LIGHT_MODEL_AMBIENT)
#if defined(GL_SCISSOR_BOX)
        case GL_SCISSOR_BOX:
#endif // defined(GL_SCISSOR_BOX)
@@ -1623,13 +1642,7 @@ android_glGetIntegerv__ILjava_nio_IntBuffer_2
#if defined(GL_COMPRESSED_TEXTURE_FORMATS)
        case GL_COMPRESSED_TEXTURE_FORMATS:
#endif // defined(GL_COMPRESSED_TEXTURE_FORMATS)
#if defined(GL_FOG_COLOR)
        case GL_FOG_COLOR:
#endif // defined(GL_FOG_COLOR)
#if defined(GL_LIGHT_MODEL_AMBIENT)
        case GL_LIGHT_MODEL_AMBIENT:
#endif // defined(GL_LIGHT_MODEL_AMBIENT)
            _needed = _NUM_COMPRESSED_TEXTURE_FORMATS;
            _needed = getNumCompressedTextureFormats();
            break;
        default:
            _needed = 0;
+1 −5
Original line number Diff line number Diff line
@@ -22,11 +22,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;

+1 −5
Original line number Diff line number Diff line
@@ -22,11 +22,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;

+1 −5
Original line number Diff line number Diff line
@@ -22,11 +22,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;

+34 −21
Original line number Diff line number Diff line
@@ -22,11 +22,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;

@@ -67,7 +63,6 @@ nativeClassInitBuffer(JNIEnv *_env)
        _env->GetFieldID(bufferClass, "_elementSizeShift", "I");
}


static void
nativeClassInit(JNIEnv *_env, jclass glImplClass)
{
@@ -118,7 +113,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)
{
@@ -126,6 +120,13 @@ 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;
}

// --------------------------------------------------------------------------

/* void glActiveTexture ( GLenum texture ) */
@@ -1022,6 +1023,12 @@ android_glGetIntegerv__I_3II
#if defined(GL_IMPLEMENTATION_COLOR_READ_TYPE_OES)
        case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
#endif // defined(GL_IMPLEMENTATION_COLOR_READ_TYPE_OES)
#if defined(GL_LIGHT_MODEL_COLOR_CONTROL)
        case GL_LIGHT_MODEL_COLOR_CONTROL:
#endif // defined(GL_LIGHT_MODEL_COLOR_CONTROL)
#if defined(GL_LIGHT_MODEL_LOCAL_VIEWER)
        case GL_LIGHT_MODEL_LOCAL_VIEWER:
#endif // defined(GL_LIGHT_MODEL_LOCAL_VIEWER)
#if defined(GL_LIGHT_MODEL_TWO_SIDE)
        case GL_LIGHT_MODEL_TWO_SIDE:
#endif // defined(GL_LIGHT_MODEL_TWO_SIDE)
@@ -1236,6 +1243,12 @@ android_glGetIntegerv__I_3II
#if defined(GL_COLOR_WRITEMASK)
        case GL_COLOR_WRITEMASK:
#endif // defined(GL_COLOR_WRITEMASK)
#if defined(GL_FOG_COLOR)
        case GL_FOG_COLOR:
#endif // defined(GL_FOG_COLOR)
#if defined(GL_LIGHT_MODEL_AMBIENT)
        case GL_LIGHT_MODEL_AMBIENT:
#endif // defined(GL_LIGHT_MODEL_AMBIENT)
#if defined(GL_SCISSOR_BOX)
        case GL_SCISSOR_BOX:
#endif // defined(GL_SCISSOR_BOX)
@@ -1267,13 +1280,7 @@ android_glGetIntegerv__I_3II
#if defined(GL_COMPRESSED_TEXTURE_FORMATS)
        case GL_COMPRESSED_TEXTURE_FORMATS:
#endif // defined(GL_COMPRESSED_TEXTURE_FORMATS)
#if defined(GL_FOG_COLOR)
        case GL_FOG_COLOR:
#endif // defined(GL_FOG_COLOR)
#if defined(GL_LIGHT_MODEL_AMBIENT)
        case GL_LIGHT_MODEL_AMBIENT:
#endif // defined(GL_LIGHT_MODEL_AMBIENT)
            _needed = _NUM_COMPRESSED_TEXTURE_FORMATS;
            _needed = getNumCompressedTextureFormats();
            break;
        default:
            _needed = 0;
@@ -1378,6 +1385,12 @@ android_glGetIntegerv__ILjava_nio_IntBuffer_2
#if defined(GL_IMPLEMENTATION_COLOR_READ_TYPE_OES)
        case GL_IMPLEMENTATION_COLOR_READ_TYPE_OES:
#endif // defined(GL_IMPLEMENTATION_COLOR_READ_TYPE_OES)
#if defined(GL_LIGHT_MODEL_COLOR_CONTROL)
        case GL_LIGHT_MODEL_COLOR_CONTROL:
#endif // defined(GL_LIGHT_MODEL_COLOR_CONTROL)
#if defined(GL_LIGHT_MODEL_LOCAL_VIEWER)
        case GL_LIGHT_MODEL_LOCAL_VIEWER:
#endif // defined(GL_LIGHT_MODEL_LOCAL_VIEWER)
#if defined(GL_LIGHT_MODEL_TWO_SIDE)
        case GL_LIGHT_MODEL_TWO_SIDE:
#endif // defined(GL_LIGHT_MODEL_TWO_SIDE)
@@ -1592,6 +1605,12 @@ android_glGetIntegerv__ILjava_nio_IntBuffer_2
#if defined(GL_COLOR_WRITEMASK)
        case GL_COLOR_WRITEMASK:
#endif // defined(GL_COLOR_WRITEMASK)
#if defined(GL_FOG_COLOR)
        case GL_FOG_COLOR:
#endif // defined(GL_FOG_COLOR)
#if defined(GL_LIGHT_MODEL_AMBIENT)
        case GL_LIGHT_MODEL_AMBIENT:
#endif // defined(GL_LIGHT_MODEL_AMBIENT)
#if defined(GL_SCISSOR_BOX)
        case GL_SCISSOR_BOX:
#endif // defined(GL_SCISSOR_BOX)
@@ -1623,13 +1642,7 @@ android_glGetIntegerv__ILjava_nio_IntBuffer_2
#if defined(GL_COMPRESSED_TEXTURE_FORMATS)
        case GL_COMPRESSED_TEXTURE_FORMATS:
#endif // defined(GL_COMPRESSED_TEXTURE_FORMATS)
#if defined(GL_FOG_COLOR)
        case GL_FOG_COLOR:
#endif // defined(GL_FOG_COLOR)
#if defined(GL_LIGHT_MODEL_AMBIENT)
        case GL_LIGHT_MODEL_AMBIENT:
#endif // defined(GL_LIGHT_MODEL_AMBIENT)
            _needed = _NUM_COMPRESSED_TEXTURE_FORMATS;
            _needed = getNumCompressedTextureFormats();
            break;
        default:
            _needed = 0;
Loading