2015-03-19 12:32:53 +08:00
|
|
|
#ifndef __PERFORMANCE_PARTICLE_3D_TEST_H__
|
|
|
|
#define __PERFORMANCE_PARTICLE_3D_TEST_H__
|
|
|
|
|
2015-05-11 16:26:14 +08:00
|
|
|
#include "BaseTest.h"
|
2015-03-19 12:32:53 +08:00
|
|
|
|
2015-05-11 16:26:14 +08:00
|
|
|
DEFINE_TEST_SUITE(PerformceParticle3DTests);
|
2015-03-19 12:32:53 +08:00
|
|
|
|
2015-05-11 16:26:14 +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);
|
2015-04-09 08:37:30 +08:00
|
|
|
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:
|
2015-05-11 16:26:14 +08:00
|
|
|
CREATE_FUNC(Particle3DPerformTest);
|
|
|
|
|
|
|
|
virtual bool init() override;
|
2015-03-19 12:32:53 +08:00
|
|
|
virtual std::string title() const override;
|
2015-07-15 12:04:48 +08:00
|
|
|
virtual void doTest()override{};
|
2015-03-19 12:32:53 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|