texturec: Support for normal maps WIP.

This commit is contained in:
Branimir Karadžić
2016-01-04 21:48:01 -08:00
parent 4a88d1cf4f
commit 4770831b11
9 changed files with 370 additions and 145 deletions

View File

@@ -1742,7 +1742,7 @@ BX_PRAGMA_DIAGNOSTIC_POP();
tc.m_sides = 0;
tc.m_depth = 0;
tc.m_numMips = 1;
tc.m_format = texture.m_requestedFormat;
tc.m_format = TextureFormat::Enum(texture.m_requestedFormat);
tc.m_cubeMap = false;
tc.m_mem = NULL;
bx::write(&writer, tc);
@@ -4175,7 +4175,7 @@ BX_PRAGMA_DIAGNOSTIC_POP();
if (convert)
{
temp = (uint8_t*)BX_ALLOC(g_allocator, rectpitch*_rect.m_height);
imageDecodeToBgra8(temp, data, _rect.m_width, _rect.m_height, srcpitch, m_requestedFormat);
imageDecodeToBgra8(temp, data, _rect.m_width, _rect.m_height, srcpitch, TextureFormat::Enum(m_requestedFormat) );
data = temp;
}