The platform will be responsible to load the OpenGL implementation and give the function pointers to Mapbox GL Core. The platform might load OpenGL by linking against some OpenGL implementation, load it dynamically, etc. It doesn't matter as long as it is a valid implementation. Also adds the `::platform` namespace where all the missing symbols and interfaces expected to be implemented by the platforms will live.
18 lines
378 B
C++
18 lines
378 B
C++
#include <mbgl/platform/gl_functions.hpp>
|
|
|
|
#include <mbgl/util/logging.hpp>
|
|
|
|
namespace mbgl {
|
|
namespace platform {
|
|
|
|
#ifndef NDEBUG
|
|
void glCheckError(const char* cmd, const char* file, int line) {
|
|
if (GLenum err = glGetError()) {
|
|
Log::Warning(Event::OpenGL, "Error %d: %s - %s:%d", err, cmd, file, line);
|
|
}
|
|
}
|
|
#endif
|
|
|
|
} // namespace platform
|
|
} // namespace mbgl
|