mirror of https://github.com/axmolengine/axmol.git
fix ShadeNodeTest->SpriteBlur
This commit is contained in:
parent
6b6b37b1ad
commit
2eaba86d76
|
@ -204,7 +204,6 @@ void ShaderNode::draw()
|
|||
|
||||
void ShaderNode::onDraw()
|
||||
{
|
||||
return;
|
||||
CC_NODE_DRAW_SETUP();
|
||||
|
||||
float w = SIZE_X, h = SIZE_Y;
|
||||
|
@ -448,6 +447,8 @@ public:
|
|||
|
||||
GLuint blurLocation;
|
||||
GLuint subLocation;
|
||||
protected:
|
||||
void onDraw();
|
||||
};
|
||||
|
||||
SpriteBlur::~SpriteBlur()
|
||||
|
@ -530,6 +531,14 @@ void SpriteBlur::initProgram()
|
|||
}
|
||||
|
||||
void SpriteBlur::draw()
|
||||
{
|
||||
CustomCommand *cmd = CustomCommand::getCommandPool().generateCommand();
|
||||
cmd->init(0, _vertexZ);
|
||||
cmd->func = CC_CALLBACK_0(SpriteBlur::onDraw, this);
|
||||
Director::getInstance()->getRenderer()->addCommand(cmd);
|
||||
}
|
||||
|
||||
void SpriteBlur::onDraw()
|
||||
{
|
||||
GL::enableVertexAttribs(cocos2d::GL::VERTEX_ATTRIB_FLAG_POS_COLOR_TEX );
|
||||
BlendFunc blend = getBlendFunc();
|
||||
|
|
Loading…
Reference in New Issue