Use std::optional instead of mbgl::optional (#911)
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
#include <EGL/egl.h>
|
||||
|
||||
#include <cassert>
|
||||
#include <sstream>
|
||||
|
||||
namespace mbgl {
|
||||
namespace gl {
|
||||
@@ -30,8 +31,8 @@ public:
|
||||
}
|
||||
|
||||
if (!eglBindAPI(EGL_OPENGL_ES_API)) {
|
||||
mbgl::Log::Error(mbgl::Event::OpenGL, "eglBindAPI(EGL_OPENGL_ES_API) returned error %d",
|
||||
eglGetError());
|
||||
mbgl::Log::Error(mbgl::Event::OpenGL, "eglBindAPI(EGL_OPENGL_ES_API) returned error " +
|
||||
std::to_string(eglGetError()));
|
||||
throw std::runtime_error("eglBindAPI() failed");
|
||||
}
|
||||
|
||||
@@ -82,8 +83,10 @@ public:
|
||||
|
||||
eglContext = eglCreateContext(eglDisplay->display, eglDisplay->config, EGL_NO_CONTEXT, attribs);
|
||||
if (eglContext == EGL_NO_CONTEXT) {
|
||||
mbgl::Log::Error(mbgl::Event::OpenGL, "eglCreateContext() returned error 0x%04x",
|
||||
eglGetError());
|
||||
std::ostringstream logMsg;
|
||||
logMsg << "eglCreateContext() returned error 0x" << std::hex << eglGetError();
|
||||
mbgl::Log::Error(mbgl::Event::OpenGL, logMsg.str());
|
||||
|
||||
throw std::runtime_error("Error creating the EGL context object.\n");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user