[core] Make the OpenGL implementation platform specific
Split the headers, so each platform includes the most appropriated header.
This commit is contained in:
@@ -76,6 +76,7 @@ macro(mbgl_platform_core)
|
||||
|
||||
target_include_directories(mbgl-core
|
||||
PRIVATE platform/default
|
||||
PRIVATE platform/linux
|
||||
)
|
||||
|
||||
target_add_mason_package(mbgl-core PUBLIC nunicode)
|
||||
@@ -149,6 +150,10 @@ macro(mbgl_platform_test)
|
||||
PRIVATE platform/default/mbgl/test/main.cpp
|
||||
)
|
||||
|
||||
target_include_directories(mbgl-test
|
||||
PRIVATE platform/linux
|
||||
)
|
||||
|
||||
set_source_files_properties(
|
||||
platform/default/mbgl/test/main.cpp
|
||||
PROPERTIES
|
||||
|
||||
11
platform/linux/mbgl/gl/gl_impl.hpp
Normal file
11
platform/linux/mbgl/gl/gl_impl.hpp
Normal file
@@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#if MBGL_USE_GLES2
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <GLES2/gl2.h>
|
||||
#include <GLES2/gl2ext.h>
|
||||
#else
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glext.h>
|
||||
#endif
|
||||
Reference in New Issue
Block a user