mirror of
https://github.com/memononen/nanovg
synced 2026-09-27 00:28:46 +03:00
- all colors in the shader is handled as premultiplied - removed alphaBlend param from nvgBeginFrame(), it became obsolete - added NVGL_TEXTURE_PREMULTIPLIED flag - separated FBO example - FBOs are treated as premultipied for correct alpha - changed FBO storage from depth/stencil 24/8 to stencil 8 - moved discard to end of shader which restores the render speed again
225 lines
6.1 KiB
Lua
225 lines
6.1 KiB
Lua
|
|
local action = _ACTION or ""
|
|
|
|
solution "nanovg"
|
|
location ( "build" )
|
|
configurations { "Debug", "Release" }
|
|
platforms {"native", "x64", "x32"}
|
|
|
|
project "nanovg"
|
|
language "C"
|
|
kind "StaticLib"
|
|
includedirs { "src" }
|
|
files { "src/*.c" }
|
|
targetdir("build")
|
|
--defines { "FONS_USE_FREETYPE" } -- Uncomment to compile with FreeType support
|
|
|
|
configuration "Debug"
|
|
defines { "DEBUG" }
|
|
flags { "Symbols", "ExtraWarnings"}
|
|
|
|
configuration "Release"
|
|
defines { "NDEBUG" }
|
|
flags { "Optimize", "ExtraWarnings"}
|
|
|
|
project "example_gl2"
|
|
kind "ConsoleApp"
|
|
language "C"
|
|
files { "example/example_gl2.c", "example/demo.c", "example/perf.c" }
|
|
includedirs { "src", "example" }
|
|
targetdir("build")
|
|
links { "nanovg" }
|
|
|
|
configuration { "linux" }
|
|
linkoptions { "`pkg-config --libs glfw3`" }
|
|
links { "GL", "GLU", "m", "GLEW" }
|
|
defines { "NANOVG_GLEW" }
|
|
|
|
configuration { "windows" }
|
|
links { "glfw3", "gdi32", "winmm", "user32", "GLEW", "glu32","opengl32" }
|
|
defines { "NANOVG_GLEW" }
|
|
|
|
configuration { "macosx" }
|
|
links { "glfw3" }
|
|
linkoptions { "-framework OpenGL", "-framework Cocoa", "-framework IOKit", "-framework CoreVideo" }
|
|
|
|
configuration "Debug"
|
|
defines { "DEBUG" }
|
|
flags { "Symbols", "ExtraWarnings"}
|
|
|
|
configuration "Release"
|
|
defines { "NDEBUG" }
|
|
flags { "Optimize", "ExtraWarnings"}
|
|
|
|
project "example_gl3"
|
|
kind "ConsoleApp"
|
|
language "C"
|
|
files { "example/example_gl3.c", "example/demo.c", "example/perf.c" }
|
|
includedirs { "src", "example" }
|
|
targetdir("build")
|
|
links { "nanovg" }
|
|
|
|
configuration { "linux" }
|
|
linkoptions { "`pkg-config --libs glfw3`" }
|
|
links { "GL", "GLU", "m", "GLEW" }
|
|
defines { "NANOVG_GLEW" }
|
|
|
|
configuration { "windows" }
|
|
links { "glfw3", "gdi32", "winmm", "user32", "GLEW", "glu32","opengl32" }
|
|
defines { "NANOVG_GLEW" }
|
|
|
|
configuration { "macosx" }
|
|
links { "glfw3" }
|
|
linkoptions { "-framework OpenGL", "-framework Cocoa", "-framework IOKit", "-framework CoreVideo" }
|
|
|
|
configuration "Debug"
|
|
defines { "DEBUG" }
|
|
flags { "Symbols", "ExtraWarnings"}
|
|
|
|
configuration "Release"
|
|
defines { "NDEBUG" }
|
|
flags { "Optimize", "ExtraWarnings"}
|
|
|
|
project "example_gl2_msaa"
|
|
kind "ConsoleApp"
|
|
language "C"
|
|
defines { "DEMO_MSAA" }
|
|
files { "example/example_gl2.c", "example/demo.c", "example/perf.c" }
|
|
includedirs { "src", "example" }
|
|
targetdir("build")
|
|
links { "nanovg" }
|
|
|
|
configuration { "linux" }
|
|
linkoptions { "`pkg-config --libs glfw3`" }
|
|
links { "GL", "GLU", "m", "GLEW" }
|
|
defines { "NANOVG_GLEW" }
|
|
|
|
configuration { "windows" }
|
|
links { "glfw3", "gdi32", "winmm", "user32", "GLEW", "glu32","opengl32" }
|
|
defines { "NANOVG_GLEW" }
|
|
|
|
configuration { "macosx" }
|
|
links { "glfw3" }
|
|
linkoptions { "-framework OpenGL", "-framework Cocoa", "-framework IOKit", "-framework CoreVideo" }
|
|
|
|
configuration "Debug"
|
|
defines { "DEBUG" }
|
|
flags { "Symbols", "ExtraWarnings"}
|
|
|
|
configuration "Release"
|
|
defines { "NDEBUG" }
|
|
flags { "Optimize", "ExtraWarnings"}
|
|
|
|
project "example_gl3_msaa"
|
|
kind "ConsoleApp"
|
|
language "C"
|
|
defines { "DEMO_MSAA" }
|
|
files { "example/example_gl3.c", "example/demo.c", "example/perf.c" }
|
|
includedirs { "src", "example" }
|
|
targetdir("build")
|
|
links { "nanovg" }
|
|
|
|
configuration { "linux" }
|
|
linkoptions { "`pkg-config --libs glfw3`" }
|
|
links { "GL", "GLU", "m", "GLEW" }
|
|
defines { "NANOVG_GLEW" }
|
|
|
|
configuration { "windows" }
|
|
links { "glfw3", "gdi32", "winmm", "user32", "GLEW", "glu32","opengl32" }
|
|
defines { "NANOVG_GLEW" }
|
|
|
|
configuration { "macosx" }
|
|
links { "glfw3" }
|
|
linkoptions { "-framework OpenGL", "-framework Cocoa", "-framework IOKit", "-framework CoreVideo" }
|
|
|
|
configuration "Debug"
|
|
defines { "DEBUG" }
|
|
flags { "Symbols", "ExtraWarnings"}
|
|
|
|
configuration "Release"
|
|
defines { "NDEBUG" }
|
|
flags { "Optimize", "ExtraWarnings"}
|
|
|
|
project "example_fbo"
|
|
kind "ConsoleApp"
|
|
language "C"
|
|
files { "example/example_fbo.c", "example/perf.c" }
|
|
includedirs { "src", "example" }
|
|
targetdir("build")
|
|
links { "nanovg" }
|
|
|
|
configuration { "linux" }
|
|
linkoptions { "`pkg-config --libs glfw3`" }
|
|
links { "GL", "GLU", "m", "GLEW" }
|
|
|
|
configuration { "windows" }
|
|
links { "glfw3", "gdi32", "winmm", "user32", "GLEW", "glu32","opengl32" }
|
|
defines { "NANOVG_GLEW" }
|
|
|
|
configuration { "macosx" }
|
|
links { "glfw3" }
|
|
linkoptions { "-framework OpenGL", "-framework Cocoa", "-framework IOKit", "-framework CoreVideo" }
|
|
|
|
configuration "Debug"
|
|
defines { "DEBUG" }
|
|
flags { "Symbols", "ExtraWarnings"}
|
|
|
|
configuration "Release"
|
|
defines { "NDEBUG" }
|
|
flags { "Optimize", "ExtraWarnings"}
|
|
|
|
project "example_gles2"
|
|
kind "ConsoleApp"
|
|
language "C"
|
|
files { "example/example_gles2.c", "example/demo.c", "example/perf.c" }
|
|
includedirs { "src", "example" }
|
|
targetdir("build")
|
|
links { "nanovg" }
|
|
|
|
configuration { "linux" }
|
|
linkoptions { "`pkg-config --libs glfw3`" }
|
|
links { "GL", "GLU", "m", "GLEW" }
|
|
|
|
configuration { "windows" }
|
|
links { "glfw3", "gdi32", "winmm", "user32", "GLEW", "glu32","opengl32" }
|
|
defines { "NANOVG_GLEW" }
|
|
|
|
configuration { "macosx" }
|
|
links { "glfw3" }
|
|
linkoptions { "-framework OpenGL", "-framework Cocoa", "-framework IOKit", "-framework CoreVideo" }
|
|
|
|
configuration "Debug"
|
|
defines { "DEBUG" }
|
|
flags { "Symbols", "ExtraWarnings"}
|
|
|
|
configuration "Release"
|
|
defines { "NDEBUG" }
|
|
flags { "Optimize", "ExtraWarnings"}
|
|
|
|
project "example_gles3"
|
|
kind "ConsoleApp"
|
|
language "C"
|
|
files { "example/example_gles3.c", "example/demo.c", "example/perf.c" }
|
|
includedirs { "src", "example" }
|
|
targetdir("build")
|
|
links { "nanovg" }
|
|
|
|
configuration { "linux" }
|
|
linkoptions { "`pkg-config --libs glfw3`" }
|
|
links { "GL", "GLU", "m", "GLEW" }
|
|
|
|
configuration { "windows" }
|
|
links { "glfw3", "gdi32", "winmm", "user32", "GLEW", "glu32","opengl32" }
|
|
defines { "NANOVG_GLEW" }
|
|
|
|
configuration { "macosx" }
|
|
links { "glfw3" }
|
|
linkoptions { "-framework OpenGL", "-framework Cocoa", "-framework IOKit", "-framework CoreVideo" }
|
|
|
|
configuration "Debug"
|
|
defines { "DEBUG" }
|
|
flags { "Symbols", "ExtraWarnings"}
|
|
|
|
configuration "Release"
|
|
defines { "NDEBUG" }
|
|
flags { "Optimize", "ExtraWarnings"}
|