OSDN Git Service

extern "C" unconditionally
authorLingfeng Yang <lfy@google.com>
Mon, 27 Feb 2017 17:40:22 +0000 (09:40 -0800)
committerLingfeng Yang <lfy@google.com>
Mon, 27 Feb 2017 17:44:12 +0000 (09:44 -0800)
This keeps older API levels from mangling GLESv3 entry points.

Change-Id: I5e751ca9f53f510d057693d368bc15c20f66e463

system/GLESv1_enc/gl_entry.cpp
system/GLESv2_enc/gl2_entry.cpp
system/renderControl_enc/renderControl_entry.cpp

index 2b7fa9f..0101e9d 100644 (file)
@@ -4,7 +4,6 @@
 #include <stdlib.h>
 #include "gl_client_context.h"
 
-#ifndef GL_TRUE
 extern "C" {
        void glAlphaFunc(GLenum func, GLclampf ref);
        void glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
@@ -299,7 +298,6 @@ extern "C" {
        void glEndTilingQCOM(GLbitfield preserveMask);
 };
 
-#endif
 #ifndef GET_CONTEXT
 static gl_client_context_t::CONTEXT_ACCESSOR_TYPE *getCurrentContext = NULL;
 void gl_client_context_t::setContextAccessor(CONTEXT_ACCESSOR_TYPE *f) { getCurrentContext = f; }
index 66c2246..5713921 100644 (file)
@@ -4,7 +4,6 @@
 #include <stdlib.h>
 #include "gl2_client_context.h"
 
-#ifndef GL_TRUE
 extern "C" {
        void glActiveTexture(GLenum texture);
        void glAttachShader(GLuint program, GLuint shader);
@@ -419,7 +418,6 @@ extern "C" {
        void glGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint* params);
 };
 
-#endif
 #ifndef GET_CONTEXT
 static gl2_client_context_t::CONTEXT_ACCESSOR_TYPE *getCurrentContext = NULL;
 void gl2_client_context_t::setContextAccessor(CONTEXT_ACCESSOR_TYPE *f) { getCurrentContext = f; }
index d33cf05..101806e 100644 (file)
@@ -4,7 +4,6 @@
 #include <stdlib.h>
 #include "renderControl_client_context.h"
 
-#ifndef GL_TRUE
 extern "C" {
        GLint rcGetRendererVersion();
        EGLint rcGetEGLVersion(EGLint* major, EGLint* minor);
@@ -44,7 +43,6 @@ extern "C" {
        uint32_t rcCreateColorBufferDMA(uint32_t width, uint32_t height, GLenum internalFormat, int frameworkFormat);
 };
 
-#endif
 #ifndef GET_CONTEXT
 static renderControl_client_context_t::CONTEXT_ACCESSOR_TYPE *getCurrentContext = NULL;
 void renderControl_client_context_t::setContextAccessor(CONTEXT_ACCESSOR_TYPE *f) { getCurrentContext = f; }