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

@@ -2200,7 +2200,7 @@ namespace bgfx { namespace gl
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);
@@ -4316,7 +4316,7 @@ namespace bgfx { namespace gl
if (convert)
{
imageDecodeToRgba8(temp, data, width, height, srcpitch, m_requestedFormat);
imageDecodeToRgba8(temp, data, width, height, srcpitch, TextureFormat::Enum(m_requestedFormat) );
data = temp;
srcpitch = rectpitch;
}