/********************************************************************
*
* File: fsCRenderCommandLine.h
*
* Purpose: cocos2d-x line renderer commands
*
*********************************************************************/
#ifndef fsCRenderCommandLinehdr
#define fsCRenderCommandLinehdr
#include <renderer/CCCustomCommand.h>
#include "../../../fsIRenderer.h"
#include "fsIRenderCommand.h"
class fsIRenderData;
class fsCRenderCommandLine : public fsIRendererCommand
{
friend class fsCRenderer;
public:
void init(fsS32 pLines);
fsCRenderCommandLine(fsS32 pLines);
~fsCRenderCommandLine();<--- 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