diff --git a/README.md b/README.md index e709b0d24..03468603b 100644 --- a/README.md +++ b/README.md @@ -343,7 +343,8 @@ Contributors ------------ Garett Bass ([@gtbass](https://github.com/gtbass)) - OSX port. -Jeremie Roy ([@jeremieroy](https://github.com/jeremieroy)) - Font system and examples. +Jeremie Roy ([@jeremieroy](https://github.com/jeremieroy)) - Font system and examples. +Milos Tosic ([@milostosic](https://github.com/milostosic)) - LOD example. License (BSD 2-clause) ---------------------- diff --git a/examples/12-lod/makefile b/examples/12-lod/makefile index 20522b0d6..6c1625bdf 100644 --- a/examples/12-lod/makefile +++ b/examples/12-lod/makefile @@ -9,30 +9,20 @@ BUILD_DIR=../../.build include $(BGFX_DIR)/premake/shader.mk -geometry: ../runtime/meshes/tree1b_lod0_1.bin - ../runtime/meshes/tree1b_lod0_2.bin - ../runtime/meshes/tree1b_lod1_1.bin - ../runtime/meshes/tree1b_lod1_2.bin - ../runtime/meshes/tree1b_lod2_1.bin - ../runtime/meshes/tree1b_lod2_2.bin +GEOMETRY_SOURCES = \ + tree1b_lod0_1 \ + tree1b_lod0_2 \ + tree1b_lod1_1 \ + tree1b_lod1_2 \ + tree1b_lod2_1 \ + tree1b_lod2_2 -../runtime/meshes/tree1b_lod0_1.bin: tree1b_lod0_1.obj - ..\..\tools\bin\geometryc -f tree1b_lod0_1.obj -o ..\runtime\meshes\tree1b_lod0_1.bin -s 0.1 --packnormal 1 +GEOMETRY_BIN = $(addprefix ../runtime/meshes/, $(addsuffix .bin, $(basename $(GEOMETRY_SOURCES)))) -../runtime/meshes/tree1b_lod0_2.bin: tree1b_lod0_2.obj - ..\..\tools\bin\geometryc -f tree1b_lod0_2.obj -o ..\runtime\meshes\tree1b_lod0_2.bin -s 0.1 --packnormal 1 +geometry: $(GEOMETRY_BIN) -../runtime/meshes/tree1b_lod1_1.bin: tree1b_lod1_1.obj - ..\..\tools\bin\geometryc -f tree1b_lod1_1.obj -o ..\runtime\meshes\tree1b_lod1_1.bin -s 0.1 --packnormal 1 - -../runtime/meshes/tree1b_lod1_2.bin: tree1b_lod1_2.obj - ..\..\tools\bin\geometryc -f tree1b_lod1_2.obj -o ..\runtime\meshes\tree1b_lod1_2.bin -s 0.1 --packnormal 1 - -../runtime/meshes/tree1b_lod2_1.bin: tree1b_lod2_1.obj - ..\..\tools\bin\geometryc -f tree1b_lod2_1.obj -o ..\runtime\meshes\tree1b_lod2_1.bin -s 0.1 --packnormal 1 - -../runtime/meshes/tree1b_lod2_2.bin: tree1b_lod2_2.obj - ..\..\tools\bin\geometryc -f tree1b_lod2_2.obj -o ..\runtime\meshes\tree1b_lod2_2.bin -s 0.1 --packnormal 1 +../runtime/meshes/%.bin : %.obj + $(BGFX_DIR)/tools/bin/geometryc -f $(<) -o $(@) -s 0.1 --packnormal 1 rebuild: @make -s --no-print-directory TARGET=0 clean all @@ -40,4 +30,3 @@ rebuild: @make -s --no-print-directory TARGET=2 clean all @make -s --no-print-directory TARGET=3 clean all @make -s --no-print-directory TARGET=4 clean all - diff --git a/examples/makefile b/examples/makefile index 5d8a1bb09..df06d076d 100644 --- a/examples/makefile +++ b/examples/makefile @@ -13,4 +13,8 @@ rebuild: @make -s --no-print-directory rebuild -C 07-callback @make -s --no-print-directory rebuild -C 08-update @make -s --no-print-directory rebuild -C 09-hdr + @make -s --no-print-directory rebuild -C 10-font + @make -s --no-print-directory rebuild -C 11-fontsdf + @make -s --no-print-directory rebuild -C 12-lod @make -s --no-print-directory rebuild -C common/font + @make -s --no-print-directory rebuild -C common/imgui diff --git a/examples/runtime/meshes/tree1b_lod0_1.bin b/examples/runtime/meshes/tree1b_lod0_1.bin new file mode 100644 index 000000000..477848318 Binary files /dev/null and b/examples/runtime/meshes/tree1b_lod0_1.bin differ diff --git a/examples/runtime/meshes/tree1b_lod0_2.bin b/examples/runtime/meshes/tree1b_lod0_2.bin new file mode 100644 index 000000000..e8e82b7c7 Binary files /dev/null and b/examples/runtime/meshes/tree1b_lod0_2.bin differ diff --git a/examples/runtime/meshes/tree1b_lod1_1.bin b/examples/runtime/meshes/tree1b_lod1_1.bin new file mode 100644 index 000000000..76105e662 Binary files /dev/null and b/examples/runtime/meshes/tree1b_lod1_1.bin differ diff --git a/examples/runtime/meshes/tree1b_lod1_2.bin b/examples/runtime/meshes/tree1b_lod1_2.bin new file mode 100644 index 000000000..4bb97cde8 Binary files /dev/null and b/examples/runtime/meshes/tree1b_lod1_2.bin differ diff --git a/examples/runtime/meshes/tree1b_lod2_1.bin b/examples/runtime/meshes/tree1b_lod2_1.bin new file mode 100644 index 000000000..beac9bce7 Binary files /dev/null and b/examples/runtime/meshes/tree1b_lod2_1.bin differ diff --git a/examples/runtime/meshes/tree1b_lod2_2.bin b/examples/runtime/meshes/tree1b_lod2_2.bin new file mode 100644 index 000000000..81065569c Binary files /dev/null and b/examples/runtime/meshes/tree1b_lod2_2.bin differ diff --git a/examples/runtime/shaders/dx11/fs_tree.bin b/examples/runtime/shaders/dx11/fs_tree.bin new file mode 100644 index 000000000..1f92301ea Binary files /dev/null and b/examples/runtime/shaders/dx11/fs_tree.bin differ diff --git a/examples/runtime/shaders/dx11/vs_tree.bin b/examples/runtime/shaders/dx11/vs_tree.bin new file mode 100644 index 000000000..6194a37fb Binary files /dev/null and b/examples/runtime/shaders/dx11/vs_tree.bin differ diff --git a/examples/runtime/shaders/dx9/fs_tree.bin b/examples/runtime/shaders/dx9/fs_tree.bin new file mode 100644 index 000000000..839292829 Binary files /dev/null and b/examples/runtime/shaders/dx9/fs_tree.bin differ diff --git a/examples/runtime/shaders/dx9/vs_tree.bin b/examples/runtime/shaders/dx9/vs_tree.bin new file mode 100644 index 000000000..62e9fbe29 Binary files /dev/null and b/examples/runtime/shaders/dx9/vs_tree.bin differ diff --git a/examples/runtime/shaders/gles/fs_tree.bin b/examples/runtime/shaders/gles/fs_tree.bin new file mode 100644 index 000000000..edcc966ca Binary files /dev/null and b/examples/runtime/shaders/gles/fs_tree.bin differ diff --git a/examples/runtime/shaders/gles/vs_tree.bin b/examples/runtime/shaders/gles/vs_tree.bin new file mode 100644 index 000000000..4d1df679f Binary files /dev/null and b/examples/runtime/shaders/gles/vs_tree.bin differ diff --git a/examples/runtime/shaders/glsl/fs_tree.bin b/examples/runtime/shaders/glsl/fs_tree.bin new file mode 100644 index 000000000..e9c759701 Binary files /dev/null and b/examples/runtime/shaders/glsl/fs_tree.bin differ diff --git a/examples/runtime/shaders/glsl/vs_tree.bin b/examples/runtime/shaders/glsl/vs_tree.bin new file mode 100644 index 000000000..6d9d19690 Binary files /dev/null and b/examples/runtime/shaders/glsl/vs_tree.bin differ diff --git a/premake/premake4.lua b/premake/premake4.lua index cd61aa30d..1c1bdde57 100644 --- a/premake/premake4.lua +++ b/premake/premake4.lua @@ -118,8 +118,9 @@ exampleProject("06-bump", "ffb23e6c-167b-11e2-81df-94c4dd6a022f") exampleProject("07-callback", "acc53bbc-52f0-11e2-9781-ad8edd4b7d02") exampleProject("08-update", "e011e246-5862-11e2-b202-b7cb257a7926") exampleProject("09-hdr", "969a4626-67ee-11e2-9726-9023267a7926") -exampleProject("10-font" , "EF6FD5B3-B52A-41C2-A257-9DFE709AF9E1") -exampleProject("11-fontsdf", "F4E6F96F-3DAA-4C68-8DF8-BF2A3ECD9092") +exampleProject("10-font" , "ef6fd5b3-b52a-41c2-a257-9dfe709af9e1") +exampleProject("11-fontsdf", "f4e6f96f-3daa-4c68-8df8-bf2a3ecd9092") +exampleProject("12-lod", "0512e9e6-bfd8-11e2-8e34-0291bd4c8125") dofile "makedisttex.lua" dofile "shaderc.lua" dofile "texturec.lua"