changeset 36:2979b69eef55

did: migrate rest of make functionality
author Sam <sam@basx.dev>
date Mon, 16 Jan 2023 00:45:31 +0700
parents 7f99b21a8777
children 6859bcfabc62
files Makefile config.nims notes
diffstat 3 files changed, 18 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Mon Jan 16 00:35:41 2023 +0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-# compilation requirements
-examples/glslangValidator: thirdparty/bin/linux/glslangValidator
-	cp $< examples
-examples/glslangValidator.exe: thirdparty/bin/windows/glslangValidator.exe
-	cp $< examples
-
-# download thirdparty-libraries
-
-thirdparty/bin/linux/glslangValidator:
-	mkdir -p $$( dirname $@ )
-	cd $$( dirname $@ ) && wget https://github.com/KhronosGroup/glslang/releases/download/master-tot/glslang-master-linux-Release.zip
-	cd $$( dirname $@ ) && unzip *.zip
-	cd $$( dirname $@ ) && mv bin/* .
-	cd $$( dirname $@ ) && rm -rf *.zip bin lib include
-thirdparty/bin/windows/glslangValidator.exe:
-	mkdir -p $$( dirname $@ )
-	cd $$( dirname $@ ) && wget https://github.com/KhronosGroup/glslang/releases/download/master-tot/glslang-master-windows-x64-Release.zip
-	cd $$( dirname $@ ) && unzip *.zip
-	cd $$( dirname $@ ) && mv bin/* .
-	cd $$( dirname $@ ) && rm -rf *.zip bin lib include
--- a/config.nims	Mon Jan 16 00:35:41 2023 +0700
+++ b/config.nims	Mon Jan 16 00:45:31 2023 +0700
@@ -104,6 +104,21 @@
 task publish, "publish all build":
   exec("rsync -rv build/ basx.dev:/var/www/public.basx.dev/zamikongine")
 
+task glslangValidator, "Download glslangValidator (required for linux compilation)":
+  let dirname="/tmp/glslang_download"
+  exec &"mkdir -p {dirname}"
+  exec &"cd {dirname} && wget https://github.com/KhronosGroup/glslang/releases/download/master-tot/glslang-master-linux-Release.zip"
+  exec &"cd {dirname} && unzip *.zip"
+  exec &"mv {dirname}/bin/glslangValidator examples/"
+  exec &"rm -rf {dirname}"
+
+task glslangValidator_exe, "Download glslangValidator.exe (required for windows compilation)":
+  let dirname="/tmp/glslang_download"
+  exec &"mkdir -p {dirname}"
+  exec &"cd {dirname} && wget https://github.com/KhronosGroup/glslang/releases/download/master-tot/glslang-master-windows-x64-Release.zip"
+  exec &"cd {dirname} && unzip *.zip"
+  exec &"mv {dirname}/bin/glslangValidator.exe examples/"
+  exec &"rm -rf {dirname}"
 
 if getCommand() in ["c", "compile", "r", "dump", "check"]:
   compilerFlags()
--- a/notes	Mon Jan 16 00:35:41 2023 +0700
+++ b/notes	Mon Jan 16 00:45:31 2023 +0700
@@ -18,7 +18,7 @@
 Rendering:
 
 - [x] Uniforms
-- [ ] Per-instance vertex attributes
+- [x]  Per-instance vertex attributes
 - [ ] Textures
 - [ ] Depth buffering
 
@@ -27,9 +27,10 @@
 - [ ] Mipmaps 
 - [ ] Multisampling 
 - [ ] Better scenegraph API
+- [ ] Instanced drawing
 
 Build-system:
-- [ ] move all of Makefile to config.nims
+- [x] move all of Makefile to config.nims
 
 Asset handling:
 - [ ] Mesh files (Wavefront OBJ, MTL) (use something from sketchfab to get started, e.g. https://sketchfab.com/nigelgoh)