Merge pull request #357 from ckaran/master

Bug fixes to compile under OS X 12.3
This commit is contained in:
Mikko Mononen 2017-02-23 19:47:47 +02:00 • committed by GitHub
commit 51284049e2
2 changed files with 13 additions and 9 deletions

View file

@ -5,7 +5,7 @@ solution "nanovg"
location ( "build" )
configurations { "Debug", "Release" }
platforms {"native", "x64", "x32"}
project "nanovg"
language "C"
kind "StaticLib"
@ -13,7 +13,7 @@ solution "nanovg"
files { "src/*.c" }
targetdir("build")
defines { "_CRT_SECURE_NO_WARNINGS" } --,"FONS_USE_FREETYPE" } Uncomment to compile with FreeType support
configuration "Debug"
defines { "DEBUG" }
flags { "Symbols", "ExtraWarnings"}
@ -42,7 +42,7 @@ solution "nanovg"
configuration { "macosx" }
links { "glfw3" }
linkoptions { "-framework OpenGL", "-framework Cocoa", "-framework IOKit", "-framework CoreVideo" }
linkoptions { "-framework OpenGL", "-framework Cocoa", "-framework IOKit", "-framework CoreVideo", "-framework Carbon" }
configuration "Debug"
defines { "DEBUG" }
@ -71,7 +71,7 @@ solution "nanovg"
configuration { "macosx" }
links { "glfw3" }
linkoptions { "-framework OpenGL", "-framework Cocoa", "-framework IOKit", "-framework CoreVideo" }
linkoptions { "-framework OpenGL", "-framework Cocoa", "-framework IOKit", "-framework CoreVideo", "-framework Carbon" }
configuration "Debug"
defines { "DEBUG" }
@ -101,7 +101,7 @@ solution "nanovg"
configuration { "macosx" }
links { "glfw3" }
linkoptions { "-framework OpenGL", "-framework Cocoa", "-framework IOKit", "-framework CoreVideo" }
linkoptions { "-framework OpenGL", "-framework Cocoa", "-framework IOKit", "-framework CoreVideo", "-framework Carbon" }
configuration "Debug"
defines { "DEBUG" }
@ -131,7 +131,7 @@ solution "nanovg"
configuration { "macosx" }
links { "glfw3" }
linkoptions { "-framework OpenGL", "-framework Cocoa", "-framework IOKit", "-framework CoreVideo" }
linkoptions { "-framework OpenGL", "-framework Cocoa", "-framework IOKit", "-framework CoreVideo", "-framework Carbon" }
configuration "Debug"
defines { "DEBUG" }
@ -159,7 +159,7 @@ solution "nanovg"
configuration { "macosx" }
links { "glfw3" }
linkoptions { "-framework OpenGL", "-framework Cocoa", "-framework IOKit", "-framework CoreVideo" }
linkoptions { "-framework OpenGL", "-framework Cocoa", "-framework IOKit", "-framework CoreVideo", "-framework Carbon" }
configuration "Debug"
defines { "DEBUG" }
@ -187,7 +187,7 @@ solution "nanovg"
configuration { "macosx" }
links { "glfw3" }
linkoptions { "-framework OpenGL", "-framework Cocoa", "-framework IOKit", "-framework CoreVideo" }
linkoptions { "-framework OpenGL", "-framework Cocoa", "-framework IOKit", "-framework CoreVideo", "-framework Carbon" }
configuration "Debug"
defines { "DEBUG" }
@ -215,7 +215,7 @@ solution "nanovg"
configuration { "macosx" }
links { "glfw3" }
linkoptions { "-framework OpenGL", "-framework Cocoa", "-framework IOKit", "-framework CoreVideo" }
linkoptions { "-framework OpenGL", "-framework Cocoa", "-framework IOKit", "-framework CoreVideo", "-framework Carbon" }
configuration "Debug"
defines { "DEBUG" }

View file

@ -113,6 +113,10 @@ enum NVGimageFlagsGL {
#include <math.h>
#include "nanovg.h"
#ifdef __APPLE__
# include <OpenGL/glext.h>
#endif
enum GLNVGuniformLoc {
GLNVG_LOC_VIEWSIZE,
GLNVG_LOC_TEX,