# HG changeset patch # User Sam # Date 1673804731 -25200 # Node ID 2979b69eef557bc6d21ea5466c665ffb5203195d # Parent 7f99b21a8777b21ba50f5a33f945978424c6dd3f did: migrate rest of make functionality diff -r 7f99b21a8777 -r 2979b69eef55 Makefile --- 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 diff -r 7f99b21a8777 -r 2979b69eef55 config.nims --- 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() diff -r 7f99b21a8777 -r 2979b69eef55 notes --- 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)