fix
This commit is contained in:
@@ -35,6 +35,7 @@ static std::string getFileNameWithoutExtension(const std::string& filename)
|
|||||||
Model::Model()
|
Model::Model()
|
||||||
{
|
{
|
||||||
m_numPoses = 0;
|
m_numPoses = 0;
|
||||||
|
m_iqm = false;
|
||||||
|
|
||||||
//m_boundingBox.min = glm::vec3(0.0f);
|
//m_boundingBox.min = glm::vec3(0.0f);
|
||||||
//m_boundingBox.max = glm::vec3(0.0f);
|
//m_boundingBox.max = glm::vec3(0.0f);
|
||||||
@@ -430,6 +431,8 @@ void Model::LoadIqm(const char* filename)
|
|||||||
}
|
}
|
||||||
|
|
||||||
free(pHdr);
|
free(pHdr);
|
||||||
|
|
||||||
|
m_iqm = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Model::LoadObj(const char* filename)
|
void Model::LoadObj(const char* filename)
|
||||||
@@ -617,7 +620,9 @@ void Model::Draw(const glm::mat4& model, SkeletonInstance* instance /*= nullptr*
|
|||||||
|
|
||||||
glm::vec3 pos = model[3];
|
glm::vec3 pos = model[3];
|
||||||
|
|
||||||
Shader* shader = g_unlitSkinnedShader; //instance ? g_unlitSkinnedShader : g_unlitShader;
|
Shader* shader = g_unlitShader;
|
||||||
|
if (m_iqm)
|
||||||
|
shader = g_unlitSkinnedShader;
|
||||||
|
|
||||||
static glm::mat4 s_identityBones[128];
|
static glm::mat4 s_identityBones[128];
|
||||||
static bool ready = false;
|
static bool ready = false;
|
||||||
|
|||||||
@@ -72,6 +72,8 @@ private:
|
|||||||
BoundingBox m_boundingBox;
|
BoundingBox m_boundingBox;
|
||||||
|
|
||||||
int m_numPoses;
|
int m_numPoses;
|
||||||
|
|
||||||
|
bool m_iqm;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // !MODEL_H
|
#endif // !MODEL_H
|
||||||
|
|||||||
Reference in New Issue
Block a user