Remove old code for getting straight frame
With hardware skinning it is not necessary
This commit is contained in:
parent
bfd57659eb
commit
28841d601d
@ -1228,8 +1228,7 @@ scene::IMeshSceneNode *IrrDriver::addMesh(scene::IMesh *mesh,
|
|||||||
const std::string& debug_name,
|
const std::string& debug_name,
|
||||||
scene::ISceneNode *parent,
|
scene::ISceneNode *parent,
|
||||||
RenderInfo* render_info,
|
RenderInfo* render_info,
|
||||||
bool all_parts_colorized,
|
bool all_parts_colorized)
|
||||||
int frame_for_mesh)
|
|
||||||
{
|
{
|
||||||
#ifdef SERVER_ONLY
|
#ifdef SERVER_ONLY
|
||||||
return m_scene_manager->addMeshSceneNode(mesh, parent);
|
return m_scene_manager->addMeshSceneNode(mesh, parent);
|
||||||
@ -1247,8 +1246,7 @@ scene::IMeshSceneNode *IrrDriver::addMesh(scene::IMesh *mesh,
|
|||||||
core::vector3df(0, 0, 0),
|
core::vector3df(0, 0, 0),
|
||||||
core::vector3df(1.0f, 1.0f, 1.0f),
|
core::vector3df(1.0f, 1.0f, 1.0f),
|
||||||
true, render_info,
|
true, render_info,
|
||||||
all_parts_colorized,
|
all_parts_colorized);
|
||||||
frame_for_mesh);
|
|
||||||
node->drop();
|
node->drop();
|
||||||
|
|
||||||
return node;
|
return node;
|
||||||
|
@ -255,8 +255,7 @@ public:
|
|||||||
const std::string& debug_name,
|
const std::string& debug_name,
|
||||||
scene::ISceneNode *parent = NULL,
|
scene::ISceneNode *parent = NULL,
|
||||||
RenderInfo* render_info = NULL,
|
RenderInfo* render_info = NULL,
|
||||||
bool all_parts_colorized = false,
|
bool all_parts_colorized = false);
|
||||||
int frame_for_mesh = -1);
|
|
||||||
PerCameraNode *addPerCameraNode(scene::ISceneNode* node,
|
PerCameraNode *addPerCameraNode(scene::ISceneNode* node,
|
||||||
scene::ICameraSceneNode* cam,
|
scene::ICameraSceneNode* cam,
|
||||||
scene::ISceneNode *parent = NULL);
|
scene::ISceneNode *parent = NULL);
|
||||||
|
@ -52,14 +52,12 @@ STKMeshSceneNode::STKMeshSceneNode(irr::scene::IMesh* mesh, ISceneNode* parent,
|
|||||||
irr::s32 id, const std::string& debug_name,
|
irr::s32 id, const std::string& debug_name,
|
||||||
const irr::core::vector3df& position,
|
const irr::core::vector3df& position,
|
||||||
const irr::core::vector3df& rotation,
|
const irr::core::vector3df& rotation,
|
||||||
const irr::core::vector3df& scale, bool createGLMeshes, RenderInfo* render_info, bool all_parts_colorized,
|
const irr::core::vector3df& scale, bool createGLMeshes, RenderInfo* render_info, bool all_parts_colorized) :
|
||||||
int frame_for_mesh) :
|
|
||||||
CMeshSceneNode(mesh, parent, mgr, id, position, rotation, scale)
|
CMeshSceneNode(mesh, parent, mgr, id, position, rotation, scale)
|
||||||
{
|
{
|
||||||
isDisplacement = false;
|
isDisplacement = false;
|
||||||
immediate_draw = false;
|
immediate_draw = false;
|
||||||
update_each_frame = false;
|
update_each_frame = false;
|
||||||
m_frame_for_mesh = frame_for_mesh;
|
|
||||||
isGlow = false;
|
isGlow = false;
|
||||||
m_got_animated_matrix = false;
|
m_got_animated_matrix = false;
|
||||||
|
|
||||||
@ -262,18 +260,9 @@ void STKMeshSceneNode::updateGL()
|
|||||||
{
|
{
|
||||||
if (isGLInitialized)
|
if (isGLInitialized)
|
||||||
return;
|
return;
|
||||||
|
for (u32 i = 0; i < Mesh->getMeshBufferCount(); ++i)
|
||||||
scene::IAnimatedMesh* am = dynamic_cast<scene::IAnimatedMesh*>(Mesh);
|
|
||||||
scene::IMesh* m = Mesh;
|
|
||||||
if (am && m_frame_for_mesh > -1)
|
|
||||||
{
|
{
|
||||||
// Get the correct frame of animation for animated mesh
|
scene::IMeshBuffer* mb = Mesh->getMeshBuffer(i);
|
||||||
m = am->getMesh(m_frame_for_mesh);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (u32 i = 0; i < m->getMeshBufferCount(); ++i)
|
|
||||||
{
|
|
||||||
scene::IMeshBuffer* mb = m->getMeshBuffer(i);
|
|
||||||
if (!mb)
|
if (!mb)
|
||||||
continue;
|
continue;
|
||||||
GLMesh &mesh = GLmeshes[i];
|
GLMesh &mesh = GLmeshes[i];
|
||||||
|
@ -29,7 +29,6 @@ class STKMeshSceneNode : public irr::scene::CMeshSceneNode, public STKMeshCommon
|
|||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
PtrVector<RenderInfo> m_static_render_info;
|
PtrVector<RenderInfo> m_static_render_info;
|
||||||
int m_frame_for_mesh;
|
|
||||||
bool m_got_animated_matrix;
|
bool m_got_animated_matrix;
|
||||||
std::vector<GLMesh> GLmeshes;
|
std::vector<GLMesh> GLmeshes;
|
||||||
core::matrix4 ModelViewProjectionMatrix;
|
core::matrix4 ModelViewProjectionMatrix;
|
||||||
@ -60,8 +59,7 @@ public:
|
|||||||
const irr::core::vector3df& rotation = irr::core::vector3df(0, 0, 0),
|
const irr::core::vector3df& rotation = irr::core::vector3df(0, 0, 0),
|
||||||
const irr::core::vector3df& scale = irr::core::vector3df(1.0f, 1.0f, 1.0f),
|
const irr::core::vector3df& scale = irr::core::vector3df(1.0f, 1.0f, 1.0f),
|
||||||
bool createGLMeshes = true,
|
bool createGLMeshes = true,
|
||||||
RenderInfo* render_info = NULL, bool all_parts_colorized = false,
|
RenderInfo* render_info = NULL, bool all_parts_colorized = false);
|
||||||
int frame_for_mesh = -1);
|
|
||||||
virtual void render();
|
virtual void render();
|
||||||
virtual void setMesh(irr::scene::IMesh* mesh);
|
virtual void setMesh(irr::scene::IMesh* mesh);
|
||||||
virtual void OnRegisterSceneNode();
|
virtual void OnRegisterSceneNode();
|
||||||
|
@ -427,21 +427,16 @@ scene::ISceneNode* KartModel::attachModel(bool animated_models, bool always_anim
|
|||||||
: 0;
|
: 0;
|
||||||
|
|
||||||
scene::IMesh* main_frame = m_mesh;
|
scene::IMesh* main_frame = m_mesh;
|
||||||
#ifndef SERVER_ONLY
|
main_frame = m_mesh->getMesh(straight_frame);
|
||||||
if (!CVS->isGLSL())
|
main_frame->setHardwareMappingHint(scene::EHM_STATIC);
|
||||||
{
|
|
||||||
main_frame = m_mesh->getMesh(straight_frame);
|
|
||||||
main_frame->setHardwareMappingHint(scene::EHM_STATIC);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
std::string debug_name;
|
std::string debug_name;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
debug_name = m_model_filename + " (kart-model)";
|
debug_name = m_model_filename + " (kart-model)";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
node = irr_driver->addMesh(main_frame, debug_name,
|
node = irr_driver->addMesh(main_frame, debug_name,
|
||||||
NULL /*parent*/, getRenderInfo(), false, straight_frame);
|
NULL /*parent*/, getRenderInfo());
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
node->setName(debug_name.c_str());
|
node->setName(debug_name.c_str());
|
||||||
|
Loading…
Reference in New Issue
Block a user