From d7c1d6b6aad8291e8192faba82f06c27707391dd Mon Sep 17 00:00:00 2001 From: yangxiao Date: Fri, 6 Mar 2015 09:57:48 +0800 Subject: [PATCH] add billboard to transparent queue --- cocos/3d/CCBillBoard.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cocos/3d/CCBillBoard.cpp b/cocos/3d/CCBillBoard.cpp index 8a26a8c93f..c46dfe4075 100644 --- a/cocos/3d/CCBillBoard.cpp +++ b/cocos/3d/CCBillBoard.cpp @@ -229,9 +229,10 @@ bool BillBoard::calculateBillbaordTransform() void BillBoard::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) { //FIXME: frustum culling here - _quadCommand.init(_globalZOrder, _texture->getName(), getGLProgramState(), _blendFunc, &_quad, 1, _modelViewTransform, flags); + flags |= Node::FLAGS_RENDER_AS_3D; + _quadCommand.init(0, _texture->getName(), getGLProgramState(), _blendFunc, &_quad, 1, _modelViewTransform, flags); _quadCommand.setTransparent(true); - _quadCommand.setSkipBatching(true); + _quadCommand.set3D(true); renderer->addCommand(&_quadCommand); }