Fixed OpenGL compilation for Android

This commit is contained in:
Alex Zolotarev 2013-06-18 17:54:29 +03:00 committed by Alex Zolotarev
parent b14b75f7ac
commit 279ae88925
2 changed files with 14 additions and 9 deletions

View file

@ -84,11 +84,11 @@ namespace graphics
void (OPENGL_CALLING_CONVENTION * glGetShaderInfoLogFn)(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
void (OPENGL_CALLING_CONVENTION * glGetShaderivFn)(GLuint shader, GLenum pname, GLint *params);
void (OPENGL_CALLING_CONVENTION * glCompileShaderFn)(GLuint shader);
#if (__IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_7_0) || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_8)
void (OPENGL_CALLING_CONVENTION * glShaderSourceFn)(GLuint shader, GLsizei count, const GLchar* const *string, const GLint *length);
#else
void (OPENGL_CALLING_CONVENTION * glShaderSourceFn)(GLuint shader, GLsizei count, const GLchar* *string, const GLint *length);
void (OPENGL_CALLING_CONVENTION * glShaderSourceFn)(GLuint shader, GLsizei count, const GLchar*
#ifdef NEED_OPENGL_SHADERSOURCE_CONST
const
#endif
*string, const GLint *length);
GLuint (OPENGL_CALLING_CONVENTION * glCreateShaderFn)(GLenum type);
void (OPENGL_CALLING_CONVENTION * glDeleteShaderFn)(GLuint shader);

View file

@ -23,9 +23,15 @@
#define USE_OPENGLES20_IF_AVAILABLE 1
#include <OpenGLES/ES2/gl.h>
#define OMIM_GL_ES
#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_7_0
#define NEED_OPENGL_SHADERSOURCE_CONST
#endif
#else
#include <OpenGL/gl.h>
#include <OpenGL/glext.h>
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_8
#define NEED_OPENGL_SHADERSOURCE_CONST
#endif
#endif
#elif defined(OMIM_OS_ANDROID)
@ -54,7 +60,6 @@
#define OPENGL_CALLING_CONVENTION
#endif
#include "../../base/src_point.hpp"
#include "../../std/exception.hpp"
@ -176,11 +181,11 @@ namespace graphics
extern void (OPENGL_CALLING_CONVENTION * glGetShaderInfoLogFn)(GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
extern void (OPENGL_CALLING_CONVENTION * glGetShaderivFn)(GLuint shader, GLenum pname, GLint *params);
extern void (OPENGL_CALLING_CONVENTION * glCompileShaderFn)(GLuint shader);
#if (__IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_7_0) || (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_8)
extern void (OPENGL_CALLING_CONVENTION * glShaderSourceFn)(GLuint shader, GLsizei count, const GLchar* const *string, const GLint *length);
#else
extern void (OPENGL_CALLING_CONVENTION * glShaderSourceFn)(GLuint shader, GLsizei count, const GLchar* *string, const GLint *length);
extern void (OPENGL_CALLING_CONVENTION * glShaderSourceFn)(GLuint shader, GLsizei count, const GLchar*
#ifdef NEED_OPENGL_SHADERSOURCE_CONST
const
#endif
*string, const GLint *length);
extern GLuint (OPENGL_CALLING_CONVENTION * glCreateShaderFn)(GLenum type);
extern void (OPENGL_CALLING_CONVENTION * glDeleteShaderFn)(GLuint shader);