Switched texture assets build to ninja.

This commit is contained in:
Branimir Karadžić 2016-05-07 14:19:56 -07:00
parent 7dddab9f1c
commit 6af3a7c952
13 changed files with 35 additions and 3 deletions

View File

@ -11,6 +11,9 @@ trim_trailing_whitespace = true
[include/bgfx/c99/*.h]
indent_style = space
[*.ninja]
indent_style = space
[*.md]
trim_trailing_whitespace = false
max_line_length = 80

View File

@ -149,9 +149,9 @@ public:
// Create vertex stream declaration.
PosTexcoordVertex::init();
m_textures[0] = loadTexture("textures/texture_compression_bc1.dds", BGFX_TEXTURE_U_CLAMP|BGFX_TEXTURE_V_CLAMP);
m_textures[1] = loadTexture("textures/texture_compression_bc2.dds", BGFX_TEXTURE_U_CLAMP);
m_textures[2] = loadTexture("textures/texture_compression_bc3.dds", BGFX_TEXTURE_V_CLAMP);
m_textures[0] = loadTexture("textures/texture_compression_bc1.ktx", BGFX_TEXTURE_U_CLAMP|BGFX_TEXTURE_V_CLAMP);
m_textures[1] = loadTexture("textures/texture_compression_bc2.ktx", BGFX_TEXTURE_U_CLAMP);
m_textures[2] = loadTexture("textures/texture_compression_bc3.ktx", BGFX_TEXTURE_V_CLAMP);
m_textures[3] = loadTexture("textures/texture_compression_etc1.ktx", BGFX_TEXTURE_U_BORDER|BGFX_TEXTURE_V_BORDER|BGFX_TEXTURE_BORDER_COLOR(1) );
m_textures[4] = loadTexture("textures/texture_compression_etc2.ktx");
m_textures[5] = loadTexture("textures/texture_compression_ptc12.pvr");

View File

@ -0,0 +1,8 @@
include ../../../scripts/common.ninja
textures = ../../runtime/textures
build $textures/texture_compression_bc1.ktx: texturec_bc1 texture_compression.png
build $textures/texture_compression_bc2.ktx: texturec_bc2 texture_compression.png
build $textures/texture_compression_bc3.ktx: texturec_bc3 texture_compression.png
build $textures/texture_compression_etc1.ktx: texturec_etc1 texture_compression.png
build $textures/texture_compression_etc2.ktx: texturec_etc2 texture_compression.png

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -3,3 +3,24 @@ builddir = ../.build
rule geometryc_pack_normal
command = geometryc -f $in -o $out --packnormal 1
description = Converting geometry $in...
rule texturec_bc1
command = texturec -f $in -o $out -t bc1 -m
rule texturec_bc2
command = texturec -f $in -o $out -t bc2 -m
rule texturec_bc3
command = texturec -f $in -o $out -t bc3 -m
rule texturec_bc4
command = texturec -f $in -o $out -t bc4 -m
rule texturec_bc5
command = texturec -f $in -o $out -t bc5 -m
rule texturec_etc1
command = texturec -f $in -o $out -t etc1 -m
rule texturec_etc2
command = texturec -f $in -o $out -t etc2 -m