Upgrade OpenGL backend to ES 3.0 (#995)
Co-authored-by: Tadej Novak <tadej@tano.si>
This commit is contained in:
@@ -2,13 +2,8 @@
|
||||
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
|
||||
#ifndef MBGL_USE_GLES2
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glext.h>
|
||||
#else
|
||||
#include <GLES2/gl2.h>
|
||||
#include <GLES2/gl2ext.h>
|
||||
#endif
|
||||
#include <GLES3/gl3.h>
|
||||
#include <GLES3/gl3ext.h>
|
||||
|
||||
namespace mbgl {
|
||||
namespace platform {
|
||||
@@ -153,14 +148,5 @@ void (* const glVertexAttrib4fv)(GLuint, const GLfloat *) = ::glVertexAttrib4fv;
|
||||
void (* const glVertexAttribPointer)(GLuint, GLint, GLenum, GLboolean, GLsizei, const void *) = ::glVertexAttribPointer;
|
||||
void (* const glViewport)(GLint, GLint, GLsizei, GLsizei) = ::glViewport;
|
||||
|
||||
#ifndef MBGL_USE_GLES2
|
||||
void (* const glDrawPixels)(GLsizei, GLsizei, GLenum, GLenum, const GLvoid *) = ::glDrawPixels;
|
||||
void (* const glGetDoublev)(GLenum, GLdouble *) = ::glGetDoublev;
|
||||
void (* const glPixelTransferf)(GLenum, GLfloat) = ::glPixelTransferf;
|
||||
void (* const glPixelZoom)(GLfloat, GLfloat) = ::glPixelZoom;
|
||||
void (* const glPointSize)(GLfloat) = ::glPointSize;
|
||||
void (* const glRasterPos4d)(GLdouble, GLdouble, GLdouble, GLdouble) = ::glRasterPos4d;
|
||||
#endif
|
||||
|
||||
} // namespace platform
|
||||
} // namespace mbgl
|
||||
|
||||
@@ -37,9 +37,7 @@ public:
|
||||
}
|
||||
|
||||
const EGLint attribs[] = {
|
||||
#if MBGL_USE_GLES2
|
||||
EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
|
||||
#endif
|
||||
EGL_RENDERABLE_TYPE, EGL_OPENGL_ES3_BIT,
|
||||
EGL_SURFACE_TYPE, EGL_PBUFFER_BIT,
|
||||
EGL_NONE
|
||||
};
|
||||
@@ -77,7 +75,7 @@ public:
|
||||
// objects and also to write vertex and fragment shaders in the OpenGL ES
|
||||
// Shading Language.
|
||||
const EGLint attribs[] = {
|
||||
EGL_CONTEXT_CLIENT_VERSION, 2,
|
||||
EGL_CONTEXT_CLIENT_VERSION, 3,
|
||||
EGL_NONE
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user