mirror of https://github.com/axmolengine/axmol.git
fixed not render
This commit is contained in:
parent
93eaf44e9c
commit
a6a432d2a2
|
@ -213,6 +213,17 @@ kmMat4 Skin::getNodeToWorldTransformAR() const
|
||||||
return TransformConcat(displayTransform, _bone->getArmature()->getNodeToWorldTransform());
|
return TransformConcat(displayTransform, _bone->getArmature()->getNodeToWorldTransform());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Skin::draw()
|
||||||
|
{
|
||||||
|
kmMat4 mv;
|
||||||
|
kmGLGetMatrix(KM_GL_MODELVIEW, &mv);
|
||||||
|
|
||||||
|
//TODO implement z order
|
||||||
|
QuadCommand* renderCommand = QuadCommand::getCommandPool().generateCommand();
|
||||||
|
renderCommand->init(0, _vertexZ, _texture->getName(), _shaderProgram, _blendFunc, &_quad, 1, mv);
|
||||||
|
Director::getInstance()->getRenderer()->addCommand(renderCommand);
|
||||||
|
}
|
||||||
|
|
||||||
void Skin::setBone(Bone *bone)
|
void Skin::setBone(Bone *bone)
|
||||||
{
|
{
|
||||||
_bone = bone;
|
_bone = bone;
|
||||||
|
|
|
@ -50,6 +50,9 @@ public:
|
||||||
|
|
||||||
kmMat4 getNodeToWorldTransform() const override;
|
kmMat4 getNodeToWorldTransform() const override;
|
||||||
kmMat4 getNodeToWorldTransformAR() const;
|
kmMat4 getNodeToWorldTransformAR() const;
|
||||||
|
|
||||||
|
virtual void draw() override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @js NA
|
* @js NA
|
||||||
* @lua NA
|
* @lua NA
|
||||||
|
|
|
@ -527,7 +527,7 @@ void TestAnimationEvent::onEnter()
|
||||||
* Set armature's movement event callback function
|
* Set armature's movement event callback function
|
||||||
* To disconnect this event, just setMovementEventCallFunc(nullptr, nullptr);
|
* To disconnect this event, just setMovementEventCallFunc(nullptr, nullptr);
|
||||||
*/
|
*/
|
||||||
armature->getAnimation()->setMovementEventCallFunc(CC_CALLBACK_0(TestAnimationEvent::animationEvent, this, placeholders::_1, placeholders::_2, placeholders::_3));
|
armature->getAnimation()->setMovementEventCallFunc(CC_CALLBACK_0(TestAnimationEvent::animationEvent, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3));
|
||||||
addChild(armature);
|
addChild(armature);
|
||||||
}
|
}
|
||||||
std::string TestAnimationEvent::title() const
|
std::string TestAnimationEvent::title() const
|
||||||
|
@ -583,7 +583,7 @@ void TestFrameEvent::onEnter()
|
||||||
* Set armature's frame event callback function
|
* Set armature's frame event callback function
|
||||||
* To disconnect this event, just setFrameEventCallFunc(nullptr);
|
* To disconnect this event, just setFrameEventCallFunc(nullptr);
|
||||||
*/
|
*/
|
||||||
armature->getAnimation()->setFrameEventCallFunc(CC_CALLBACK_0(TestFrameEvent::onFrameEvent, this, placeholders::_1, placeholders::_2, placeholders::_3, placeholders::_4));
|
armature->getAnimation()->setFrameEventCallFunc(CC_CALLBACK_0(TestFrameEvent::onFrameEvent, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4));
|
||||||
addChild(armature);
|
addChild(armature);
|
||||||
|
|
||||||
schedule( schedule_selector(TestFrameEvent::checkAction) );
|
schedule( schedule_selector(TestFrameEvent::checkAction) );
|
||||||
|
@ -752,7 +752,7 @@ void TestColliderDetector::onEnter()
|
||||||
* Set armature's frame event callback function
|
* Set armature's frame event callback function
|
||||||
* To disconnect this event, just setFrameEventCallFunc(nullptr);
|
* To disconnect this event, just setFrameEventCallFunc(nullptr);
|
||||||
*/
|
*/
|
||||||
armature->getAnimation()->setFrameEventCallFunc(CC_CALLBACK_0(TestColliderDetector::onFrameEvent, this, placeholders::_1, placeholders::_2, placeholders::_3, placeholders::_4));
|
armature->getAnimation()->setFrameEventCallFunc(CC_CALLBACK_0(TestColliderDetector::onFrameEvent, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3, std::placeholders::_4));
|
||||||
addChild(armature);
|
addChild(armature);
|
||||||
|
|
||||||
armature2 = Armature::create("Cowboy");
|
armature2 = Armature::create("Cowboy");
|
||||||
|
@ -1374,12 +1374,12 @@ void TestPlaySeveralMovement::onEnter()
|
||||||
armature->setPosition(Point(VisibleRect::center().x, VisibleRect::center().y/*-100*/));
|
armature->setPosition(Point(VisibleRect::center().x, VisibleRect::center().y/*-100*/));
|
||||||
addChild(armature);
|
addChild(armature);
|
||||||
}
|
}
|
||||||
std::string TestPlaySeveralMovement::title()
|
std::string TestPlaySeveralMovement::title() const
|
||||||
{
|
{
|
||||||
return "Test play several movement";
|
return "Test play several movement";
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string TestPlaySeveralMovement::subtitle()
|
std::string TestPlaySeveralMovement::subtitle()const
|
||||||
{
|
{
|
||||||
return "Movement is played one by one";
|
return "Movement is played one by one";
|
||||||
}
|
}
|
||||||
|
@ -1405,11 +1405,11 @@ void TestEasing::onEnter()
|
||||||
updateSubTitle();
|
updateSubTitle();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string TestEasing::title()
|
std::string TestEasing::title() const
|
||||||
{
|
{
|
||||||
return "Test easing effect";
|
return "Test easing effect";
|
||||||
}
|
}
|
||||||
std::string TestEasing::subtitle()
|
std::string TestEasing::subtitle() const
|
||||||
{
|
{
|
||||||
return "Current easing : ";
|
return "Current easing : ";
|
||||||
}
|
}
|
||||||
|
|
|
@ -267,7 +267,7 @@ public:
|
||||||
~TestColliderDetector();
|
~TestColliderDetector();
|
||||||
|
|
||||||
virtual void onEnter();
|
virtual void onEnter();
|
||||||
virtual std::string title();
|
virtual std::string title() const override;
|
||||||
virtual void update(float delta);
|
virtual void update(float delta);
|
||||||
virtual void draw();
|
virtual void draw();
|
||||||
|
|
||||||
|
@ -354,8 +354,8 @@ class TestPlaySeveralMovement : public ArmatureTestLayer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual void onEnter();
|
virtual void onEnter();
|
||||||
virtual std::string title();
|
virtual std::string title() const override;
|
||||||
virtual std::string subtitle();
|
virtual std::string subtitle() const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -363,8 +363,8 @@ class TestEasing : public ArmatureTestLayer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual void onEnter();
|
virtual void onEnter();
|
||||||
virtual std::string title();
|
virtual std::string title() const override;
|
||||||
virtual std::string subtitle();
|
virtual std::string subtitle() const override;
|
||||||
|
|
||||||
void onTouchesEnded(const std::vector<Touch*>& touches, Event* event);
|
void onTouchesEnded(const std::vector<Touch*>& touches, Event* event);
|
||||||
void updateSubTitle();
|
void updateSubTitle();
|
||||||
|
|
Loading…
Reference in New Issue