|
@@ -30,12 +30,18 @@ static struct nk_glfw {
|
|
|
float scroll;
|
|
|
} glfw;
|
|
|
|
|
|
+#ifdef __APPLE__
|
|
|
+ #define NK_SHADER_VERSION "#version 400\n"
|
|
|
+#else
|
|
|
+ #define NK_SHADER_VERSION "#version 300 es\n"
|
|
|
+#endif
|
|
|
+
|
|
|
NK_API void
|
|
|
nk_glfw3_device_create(void)
|
|
|
{
|
|
|
GLint status;
|
|
|
static const GLchar *vertex_shader =
|
|
|
- "#version 300 es\n"
|
|
|
+ NK_SHADER_VERSION
|
|
|
"uniform mat4 ProjMtx;\n"
|
|
|
"in vec2 Position;\n"
|
|
|
"in vec2 TexCoord;\n"
|
|
@@ -48,7 +54,7 @@ nk_glfw3_device_create(void)
|
|
|
" gl_Position = ProjMtx * vec4(Position.xy, 0, 1);\n"
|
|
|
"}\n";
|
|
|
static const GLchar *fragment_shader =
|
|
|
- "#version 300 es\n"
|
|
|
+ NK_SHADER_VERSION
|
|
|
"precision mediump float;\n"
|
|
|
"uniform sampler2D Texture;\n"
|
|
|
"in vec2 Frag_UV;\n"
|