axmol/tests/cpp-tests/Classes/PerformanceTest/PerformanceParticle3DTest.h

39 lines
951 B
C
Raw Normal View History

2015-03-19 12:32:53 +08:00
#ifndef __PERFORMANCE_PARTICLE_3D_TEST_H__
#define __PERFORMANCE_PARTICLE_3D_TEST_H__
#include "BaseTest.h"
2015-03-19 12:32:53 +08:00
DEFINE_TEST_SUITE(PerformceParticle3DTests);
2015-03-19 12:32:53 +08:00
class Particle3DMainScene : public TestCase
2015-03-19 12:32:53 +08:00
{
public:
virtual void initWithSubTest(int subtest, int particles);
void step(float dt);
void createParticleSystem(int idx);
void testNCallback(cocos2d::Ref* sender);
2015-03-19 12:32:53 +08:00
void updateQuantityLabel();
2015-03-19 14:43:29 +08:00
int getSubTestNum() { return _subtestNumber; }
int getParticlesNum() { return _quantityParticles; }
2015-03-19 12:32:53 +08:00
virtual void doTest() = 0;
protected:
2015-03-19 14:43:29 +08:00
int _lastRenderedCount;
int _quantityParticles;
int _subtestNumber;
cocos2d::Label *_particleLab;
2015-03-19 12:32:53 +08:00
};
class Particle3DPerformTest : public Particle3DMainScene
{
public:
CREATE_FUNC(Particle3DPerformTest);
virtual bool init() override;
2015-03-19 12:32:53 +08:00
virtual std::string title() const override;
virtual void doTest(){};
2015-03-19 12:32:53 +08:00
};
#endif