mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 14:51:40 +00:00
- Initialize some variables in FModelVertex::Set
- Fix wrong normal vector in the FModelVertexBuffer constructor This fixes models having strange flickering when the model animation frame changes
This commit is contained in:
parent
64ee08d80b
commit
396bac5e4f
2 changed files with 3 additions and 1 deletions
|
@ -50,7 +50,7 @@ FModelVertexBuffer::FModelVertexBuffer(bool needindex, bool singleframe)
|
||||||
{ 1, VATTR_VERTEX2, VFmt_Float3, (int)myoffsetof(FModelVertex, x) },
|
{ 1, VATTR_VERTEX2, VFmt_Float3, (int)myoffsetof(FModelVertex, x) },
|
||||||
{ 1, VATTR_NORMAL2, VFmt_Packed_A2R10G10B10, (int)myoffsetof(FModelVertex, packedNormal) }
|
{ 1, VATTR_NORMAL2, VFmt_Packed_A2R10G10B10, (int)myoffsetof(FModelVertex, packedNormal) }
|
||||||
};
|
};
|
||||||
mVertexBuffer->SetFormat(2, 5, sizeof(FModelVertex), format);
|
mVertexBuffer->SetFormat(2, 6, sizeof(FModelVertex), format);
|
||||||
}
|
}
|
||||||
|
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
|
@ -17,6 +17,8 @@ struct FModelVertex
|
||||||
z = zz;
|
z = zz;
|
||||||
u = uu;
|
u = uu;
|
||||||
v = vv;
|
v = vv;
|
||||||
|
lu = 0.0f;
|
||||||
|
lv = 0.0f;
|
||||||
lindex = -1.0f;
|
lindex = -1.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue