Skip to content

Commit

Permalink
deps.json : add nanovg download (#220)
Browse files Browse the repository at this point in the history
Summary: Pull Request resolved: #220

Reviewed By: rokuz

Differential Revision: D66584824

Pulled By: corporateshark

fbshipit-source-id: b1531dd52b15d6b5cfe62ec5962178bc90fd1315
  • Loading branch information
vinsentli authored and facebook-github-bot committed Dec 2, 2024
1 parent 990964e commit be1e25a
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 0 deletions.
3 changes: 3 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ https://github.com/corporateshark/lightweightvk/blob/main/LICENSE.md
Meshoptimizer
https://github.com/zeux/meshoptimizer/blob/master/LICENSE.md

NanoVG
https://github.com/memononen/nanovg/blob/master/LICENSE.txt

Spark SL
https://github.com/facebook/igl/releases/download/SparkSL/SparkSL.LICENSE

Expand Down
13 changes: 13 additions & 0 deletions third-party/bootstrap-deps.json
Original file line number Diff line number Diff line change
Expand Up @@ -194,5 +194,18 @@
"url": "https://github.com/facebook/gfxreconstruct.git",
"revision": "99a2ac03e7386c9773804c7b25a3712fd867f458"
}
},
{
"name": "nanovg",
"postprocess" : {
"type" : "patch",
"file" : "nanovg.patch",
"pnum" : "0"
},
"source": {
"type": "git",
"url": "https://github.com/memononen/nanovg",
"revision": "f93799c078fa11ed61c078c65a53914c8782c00b"
}
}
]
56 changes: 56 additions & 0 deletions third-party/deps/patches/nanovg.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
Binary files ./example/.DS_Store and ./example_new/.DS_Store differ
diff --exclude=.git --exclude=.hg -rupN ./example/demo.c ./example_new/demo.c
--- ./example/demo.c 2024-11-30 17:10:38
+++ ./example_new/demo.c 2024-11-30 17:09:45
@@ -5,9 +5,7 @@
#ifdef NANOVG_GLEW
# include <GL/glew.h>
#endif
-#include <GLFW/glfw3.h>
#include "nanovg.h"
-#define STB_IMAGE_WRITE_IMPLEMENTATION
#include "stb_image_write.h"


@@ -1212,6 +1210,7 @@ static void flipHorizontal(unsigned char* image, int w
}
}

+#if 0
void saveScreenShot(int w, int h, int premult, const char* name)
{
unsigned char* image = (unsigned char*)malloc(w*h*4);
@@ -1226,3 +1225,4 @@ void saveScreenShot(int w, int h, int premult, const c
stbi_write_png(name, w, h, 4, image, w*4);
free(image);
}
+#endif
diff --exclude=.git --exclude=.hg -rupN ./example/perf.c ./example_new/perf.c
--- ./example/perf.c 2024-11-30 17:10:39
+++ ./example_new/perf.c 2024-11-30 17:10:04
@@ -5,7 +5,6 @@
#ifdef NANOVG_GLEW
# include <GL/glew.h>
#endif
-#include <GLFW/glfw3.h>
#include "nanovg.h"

#ifdef _MSC_VER
@@ -38,7 +37,7 @@ void initGPUTimer(GPUtimer* timer)
glGenQueries(GPU_QUERY_COUNT, timer->queries);
}*/
}
-
+#if 0
void startGPUTimer(GPUtimer* timer)
{
if (!timer->supported)
@@ -72,7 +71,7 @@ int stopGPUTimer(GPUtimer* timer, float* times, int ma
}
return n;
}
-
+#endif

void initGraph(PerfGraph* fps, int style, const char* name)
{

0 comments on commit be1e25a

Please sign in to comment.