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());
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
_bone = bone;
|
||||
|
|
|
@ -50,6 +50,9 @@ public:
|
|||
|
||||
kmMat4 getNodeToWorldTransform() const override;
|
||||
kmMat4 getNodeToWorldTransformAR() const;
|
||||
|
||||
virtual void draw() override;
|
||||
|
||||
/**
|
||||
* @js NA
|
||||
* @lua NA
|
||||
|
|
|
@ -527,7 +527,7 @@ void TestAnimationEvent::onEnter()
|
|||
* Set armature's movement event callback function
|
||||
* 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);
|
||||
}
|
||||
std::string TestAnimationEvent::title() const
|
||||
|
@ -583,7 +583,7 @@ void TestFrameEvent::onEnter()
|
|||
* Set armature's frame event callback function
|
||||
* 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);
|
||||
|
||||
schedule( schedule_selector(TestFrameEvent::checkAction) );
|
||||
|
@ -752,7 +752,7 @@ void TestColliderDetector::onEnter()
|
|||
* Set armature's frame event callback function
|
||||
* 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);
|
||||
|
||||
armature2 = Armature::create("Cowboy");
|
||||
|
@ -1374,12 +1374,12 @@ void TestPlaySeveralMovement::onEnter()
|
|||
armature->setPosition(Point(VisibleRect::center().x, VisibleRect::center().y/*-100*/));
|
||||
addChild(armature);
|
||||
}
|
||||
std::string TestPlaySeveralMovement::title()
|
||||
std::string TestPlaySeveralMovement::title() const
|
||||
{
|
||||
return "Test play several movement";
|
||||
}
|
||||
|
||||
std::string TestPlaySeveralMovement::subtitle()
|
||||
std::string TestPlaySeveralMovement::subtitle()const
|
||||
{
|
||||
return "Movement is played one by one";
|
||||
}
|
||||
|
@ -1405,11 +1405,11 @@ void TestEasing::onEnter()
|
|||
updateSubTitle();
|
||||
}
|
||||
|
||||
std::string TestEasing::title()
|
||||
std::string TestEasing::title() const
|
||||
{
|
||||
return "Test easing effect";
|
||||
}
|
||||
std::string TestEasing::subtitle()
|
||||
std::string TestEasing::subtitle() const
|
||||
{
|
||||
return "Current easing : ";
|
||||
}
|
||||
|
|
|
@ -267,7 +267,7 @@ public:
|
|||
~TestColliderDetector();
|
||||
|
||||
virtual void onEnter();
|
||||
virtual std::string title();
|
||||
virtual std::string title() const override;
|
||||
virtual void update(float delta);
|
||||
virtual void draw();
|
||||
|
||||
|
@ -354,8 +354,8 @@ class TestPlaySeveralMovement : public ArmatureTestLayer
|
|||
{
|
||||
public:
|
||||
virtual void onEnter();
|
||||
virtual std::string title();
|
||||
virtual std::string subtitle();
|
||||
virtual std::string title() const override;
|
||||
virtual std::string subtitle() const override;
|
||||
};
|
||||
|
||||
|
||||
|
@ -363,8 +363,8 @@ class TestEasing : public ArmatureTestLayer
|
|||
{
|
||||
public:
|
||||
virtual void onEnter();
|
||||
virtual std::string title();
|
||||
virtual std::string subtitle();
|
||||
virtual std::string title() const override;
|
||||
virtual std::string subtitle() const override;
|
||||
|
||||
void onTouchesEnded(const std::vector<Touch*>& touches, Event* event);
|
||||
void updateSubTitle();
|
||||
|
|
Loading…
Reference in New Issue