1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- #ifndef __CC_PRIMITIVE_H__
- #define __CC_PRIMITIVE_H__
- #include "renderer/CCVertexIndexData.h"
- NS_CC_BEGIN
- class IndexBuffer;
- class CC_DLL Primitive : public Ref
- {
- public:
-
- static Primitive* create(VertexData* verts, IndexBuffer* indices, int type);
-
- const VertexData* getVertexData() const;
-
- const IndexBuffer* getIndexData() const;
-
- int getType() const { return _type; }
-
-
- void draw();
-
-
- int getStart() const { return _start; }
-
- int getCount() const { return _count; }
-
- void setStart(int start);
-
- void setCount(int count);
-
- protected:
- Primitive();
- virtual ~Primitive();
-
- bool init(VertexData* verts, IndexBuffer* indices, int type);
-
- protected:
- VertexData* _verts;
- IndexBuffer* _indices;
- int _start;
- int _count;
- int _type;
- };
- NS_CC_END
- #endif
|