Fixme: frustum culling

This commit is contained in:
yangxiao 2014-09-03 09:02:32 +08:00
parent e5dd91029a
commit fed2021707
2 changed files with 2 additions and 3 deletions

View File

@ -103,10 +103,8 @@ void BillBorad::draw(Renderer *renderer, const Mat4 &transform, uint32_t flags)
_zDepthInView = -modelViewMat.m[14];
_mv = viewInverseMat;
}
//// Don't do calculate the culling if the transform was not updated
//_insideBounds = (flags & FLAGS_TRANSFORM_DIRTY) ? renderer->checkVisibility(transMat, _contentSize) : _insideBounds;
//if(_insideBounds)
//FIXME: frustum culling here
{
_quadCommand.init(_zDepthInView, _texture->getName(), getGLProgramState(), _blendFunc, &_quad, 1, transform * _mv);
renderer->addTransparentCommand(&_quadCommand);

View File

@ -76,6 +76,7 @@ public:
*/
static BillBorad* createWithTexture(Texture2D *texture);
//override
/** draw BillBorad object */
virtual void draw(Renderer *renderer, const Mat4 &transform, uint32_t flags) override;