forked from organicmaps/organicmaps
maemo opengl es2
This commit is contained in:
parent
8bfb159f10
commit
7698b8ea9e
3 changed files with 23 additions and 2 deletions
|
@ -152,5 +152,9 @@ win32* {
|
|||
SOURCES += opengl/opengl_es2.cpp
|
||||
} else {
|
||||
HEADERS +=
|
||||
SOURCES += opengl/opengl_ext.cpp
|
||||
if CONFIG(OMIM_OS_MAEMO) {
|
||||
SOURCES += opengl/opengl_es2.cpp
|
||||
} else {
|
||||
SOURCES += opengl/opengl_ext.cpp
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,10 +34,17 @@
|
|||
|
||||
#define OMIM_GL_ES
|
||||
|
||||
#elif defined(OMIM_OS_MAEMO)
|
||||
#define USE_OPENGLES20_IF_AVAILABLE 1
|
||||
#include <GLES2/gl2.h>
|
||||
#include <GLES2/gl2ext.h>
|
||||
#define OMIM_GL_ES
|
||||
|
||||
#else
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glext.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
#include "opengl.hpp"
|
||||
#include "opengl_glsl_impl.hpp"
|
||||
|
||||
#ifdef OMIM_OS_MAEMO
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <GLES2/gl2ext.h>
|
||||
#endif
|
||||
|
||||
#ifdef OMIM_OS_ANDROID
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <GLES2/gl2ext.h>
|
||||
|
@ -47,8 +52,13 @@ namespace graphics
|
|||
|
||||
g_isMapBufferSupported = HasExtension("GL_OES_mapbuffer");
|
||||
|
||||
#ifdef OMIM_OS_MAEMO
|
||||
glMapBufferFn = 0;
|
||||
glUnmapBufferFn = 0;
|
||||
#else
|
||||
glMapBufferFn = &glMapBufferOES;
|
||||
glUnmapBufferFn = &glUnmapBufferOES;
|
||||
#endif
|
||||
|
||||
g_isFramebufferSupported = true;
|
||||
|
||||
|
@ -59,7 +69,7 @@ namespace graphics
|
|||
glDeleteFramebuffersFn = &glDeleteFramebuffers;
|
||||
glCheckFramebufferStatusFn = &glCheckFramebufferStatus;
|
||||
// this extension is defined in headers but absent in library on Android ARM platform
|
||||
#if defined(OMIM_OS_ANDROID) && defined(__arm__)
|
||||
#if (defined(OMIM_OS_ANDROID) && defined(__arm__)) || defined(OMIM_OS_MAEMO)
|
||||
glDiscardFramebufferFn = 0;
|
||||
#else
|
||||
glDiscardFramebufferFn = &glDiscardFramebufferEXT;
|
||||
|
|
Loading…
Add table
Reference in a new issue