1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/********************************************************************
*
*	File:		fsCRenderCommandTriangleShaded.h
*
*	Purpose:	cocos2d-x shaded / untextured triangle renderer commands
*
*********************************************************************/

#ifndef fsCRenderCommandTriangleShadedhdr
#define fsCRenderCommandTriangleShadedhdr

#include <renderer/CCTrianglesCommand.h>

#include "fsIRenderCommand.h"
#include "../../../fsISpriteRenderData.h"
#include "renderer/CCCustomCommand.h"

class fsCTexture;


class fsCRenderCommandTriangleShaded : public fsIRendererCommand
{
	friend class fsCRenderer;

public:

	void init(fsS32 pSprites);

	fsCRenderCommandTriangleShaded(fsS32 pSprites);
	~fsCRenderCommandTriangleShaded();<--- Destructor in derived class

protected:
private:

	void batchDataRender() override;

	void batchDataPopulate(fsIRenderData const* pRenderData, fsS32 pOffest,
	                       fsIRenderer::eSPRITE_STRIP_PLACE pPlace) override;

	void pipelineSetup(cocos2d::PipelineDescriptor& pPipelineDescriptor, cocos2d::backend::ProgramType pProgram);
	void buffersCreate(fsS32 pCount);

	cocos2d::CustomCommand _customCommandGLLine;
	cocos2d::V2F_C4B_T2F* _bufferGLLine = nullptr;
	int _bufferCapacityGLLine = 0;
	int _bufferCountGLLine = 0;
};

#endif