set normals/sts as present in md2/dff
This commit is contained in:
@@ -244,6 +244,8 @@ void DffLoader::readGeometryExtension(MeshFrame *o_frame, char **materialNames,
|
|||||||
{
|
{
|
||||||
u32 facesCount = readDwordFromArrayLE(t_buffer, t_ptrPos);
|
u32 facesCount = readDwordFromArrayLE(t_buffer, t_ptrPos);
|
||||||
u32 materialIndex = readDwordFromArrayLE(t_buffer, t_ptrPos);
|
u32 materialIndex = readDwordFromArrayLE(t_buffer, t_ptrPos);
|
||||||
|
o_frame->getMaterial(i).setSTsPresent(true);
|
||||||
|
o_frame->getMaterial(i).setNormalsPresent(true);
|
||||||
o_frame->getMaterial(i).allocateFaces(facesCount);
|
o_frame->getMaterial(i).allocateFaces(facesCount);
|
||||||
o_frame->getMaterial(i).setName(materialNames[materialIndex]);
|
o_frame->getMaterial(i).setName(materialNames[materialIndex]);
|
||||||
for (u32 j = 0; j < facesCount; j++)
|
for (u32 j = 0; j < facesCount; j++)
|
||||||
|
|||||||
@@ -138,6 +138,8 @@ MeshFrame *MD2Loader::load(u32 &o_framesCount, char *t_subpath, char *t_nameWith
|
|||||||
{
|
{
|
||||||
for (u32 x = 0; x < framesCount; x++)
|
for (u32 x = 0; x < framesCount; x++)
|
||||||
{
|
{
|
||||||
|
resultFrames[x].getMaterial(0).setSTsPresent(true);
|
||||||
|
resultFrames[x].getMaterial(0).setNormalsPresent(true);
|
||||||
resultFrames[x].getMaterial(0).setVertexFace((i * 3) + j, triangle->index_xyz[j]);
|
resultFrames[x].getMaterial(0).setVertexFace((i * 3) + j, triangle->index_xyz[j]);
|
||||||
resultFrames[x].getMaterial(0).setSTFace((i * 3) + j, triangle->index_st[j]);
|
resultFrames[x].getMaterial(0).setSTFace((i * 3) + j, triangle->index_st[j]);
|
||||||
resultFrames[x].getMaterial(0).setNormalFace((i * 3) + j, triangle->index_xyz[j]);
|
resultFrames[x].getMaterial(0).setNormalFace((i * 3) + j, triangle->index_xyz[j]);
|
||||||
|
|||||||
Reference in New Issue
Block a user