- cleaned up MD3 rendering and merged RenderFrame and RenderFrameInterpolated into one function.

This commit is contained in:
Christoph Oelckers 2014-06-19 13:58:49 +02:00
commit 03916d75de
5 changed files with 28 additions and 79 deletions

View file

@ -269,7 +269,7 @@ void FDMDModel::RenderGLCommands(void *glCommands, unsigned int numVertices, FMo
char *pos;
FGLCommandVertex * v;
int count;
const bool interpolate = (vertices2 != NULL && inter != 0.);
const bool interpolate = (vertices2 != NULL && inter != 0. && vertices != vertices2);
gl_RenderState.Apply();
for(pos = (char*)glCommands; *pos;)
@ -304,7 +304,7 @@ void FDMDModel::RenderGLCommands(void *glCommands, unsigned int numVertices, FMo
}
}
void FDMDModel::RenderFrameInterpolated(FTexture * skin, int frameno, int frameno2, double inter, int translation)
void FDMDModel::RenderFrame(FTexture * skin, int frameno, int frameno2, double inter, int translation)
{
if (frameno >= info.numFrames || frameno2 >= info.numFrames) return;
@ -323,11 +323,6 @@ void FDMDModel::RenderFrameInterpolated(FTexture * skin, int frameno, int framen
}
void FDMDModel::RenderFrame(FTexture * skin, int frameno, int translation)
{
RenderFrameInterpolated(skin, frameno, frameno, 0., translation);
}
//===========================================================================
//
// FMD2Model::Load