Make internal vertex attribute code less OpenGL-specific.

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2017-10-25 23:12:39 -03:00
parent b0c5bf2156
commit 15cc540e4c
28 changed files with 369 additions and 230 deletions
+3 -3
View File
@@ -167,8 +167,6 @@ public:
void setDrawRange();
bool getDrawRange(int &start, int &count) const;
virtual int bindAttributeToShaderInput(int attributeindex, const std::string &inputname) = 0;
// Implements Drawable.
void draw(Graphics *gfx, const Matrix4 &m) override;
@@ -178,6 +176,8 @@ public:
protected:
friend class SpriteBatch;
struct AttachedAttribute
{
Mesh *mesh;
@@ -190,7 +190,7 @@ protected:
void calculateAttributeSizes();
size_t getAttributeOffset(size_t attribindex) const;
virtual void drawInternal(int start, int count, int instancecount, bool useindexbuffer, uint32 attribflags, uint32 instancedattribflags) const = 0;
virtual void drawInternal(int start, int count, int instancecount, bool useindexbuffer, const vertex::Attributes &attributes, const vertex::Buffers &buffers) const = 0;
std::vector<AttribFormat> vertexFormat;
std::vector<size_t> attributeSizes;