Minor formating tweaks
This commit is contained in:
parent
3888299bf5
commit
31edd13a72
3 changed files with 20 additions and 18 deletions
|
@ -2117,13 +2117,14 @@ void UpdateModelAnimation(Model model, ModelAnimation anim, int frame)
|
|||
for (int m = 0; m < model.meshCount; m++)
|
||||
{
|
||||
Mesh mesh = model.meshes[m];
|
||||
|
||||
if (mesh.boneIds == NULL || mesh.boneWeights == NULL)
|
||||
{
|
||||
TRACELOG(LOG_WARNING, "MODEL: UpdateModelAnimation Mesh %i has no connection to bones",m);
|
||||
TRACELOG(LOG_WARNING, "MODEL: UpdateModelAnimation(): Mesh %i has no connection to bones", m);
|
||||
continue;
|
||||
}
|
||||
|
||||
bool updated = false; // set to true when anim vertex information is updated
|
||||
bool updated = false; // Flag to check when anim vertex information is updated
|
||||
Vector3 animVertex = { 0 };
|
||||
Vector3 animNormal = { 0 };
|
||||
|
||||
|
@ -2157,11 +2158,10 @@ void UpdateModelAnimation(Model model, ModelAnimation anim, int frame)
|
|||
for (int j = 0; j < 4; j++, boneCounter++)
|
||||
{
|
||||
boneWeight = mesh.boneWeights[boneCounter];
|
||||
// early stop when no transformation will be applied
|
||||
if (boneWeight == 0.0f)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Early stop when no transformation will be applied
|
||||
if (boneWeight == 0.0f) continue;
|
||||
|
||||
boneId = mesh.boneIds[boneCounter];
|
||||
//int boneIdParent = model.bones[boneId].parent;
|
||||
inTranslation = model.bindPose[boneId].translation;
|
||||
|
@ -2198,8 +2198,9 @@ void UpdateModelAnimation(Model model, ModelAnimation anim, int frame)
|
|||
}
|
||||
|
||||
// Upload new vertex data to GPU for model drawing
|
||||
// Only update data when values changed.
|
||||
if (updated){
|
||||
// NOTE: Only update data when values changed
|
||||
if (updated)
|
||||
{
|
||||
rlUpdateVertexBuffer(mesh.vboId[0], mesh.animVertices, mesh.vertexCount*3*sizeof(float), 0); // Update vertex position
|
||||
rlUpdateVertexBuffer(mesh.vboId[2], mesh.animNormals, mesh.vertexCount*3*sizeof(float), 0); // Update vertex normals
|
||||
}
|
||||
|
|
|
@ -1297,6 +1297,7 @@ Image ImageTextEx(Font font, const char *text, float fontSize, float spacing, Co
|
|||
TRACELOG(LOG_INFO, "IMAGE: Text scaled by factor: %f", scaleFactor);
|
||||
|
||||
// Using nearest-neighbor scaling algorithm for default font
|
||||
// TODO: Allow defining the preferred scaling mechanism externally
|
||||
// WARNING: Module required: rtext
|
||||
if (font.texture.id == GetFontDefault().texture.id) ImageResizeNN(&imText, (int)(imSize.x*scaleFactor), (int)(imSize.y*scaleFactor));
|
||||
else ImageResize(&imText, (int)(imSize.x*scaleFactor), (int)(imSize.y*scaleFactor));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue