love.graphics: move more platform-independent code out of the opengl backend

--HG--
branch : minor
This commit is contained in:
Alex Szpakowski
2017-07-22 23:34:39 -03:00
parent b568e267eb
commit 864147c38c
22 changed files with 368 additions and 316 deletions
+4 -2
View File
@@ -195,11 +195,11 @@ public:
virtual int bindAttributeToShaderInput(int attributeindex, const std::string &inputname) = 0;
virtual void drawInstanced(Graphics *gfx, const Matrix4 &m, int instancecount) = 0;
// Implements Drawable.
void draw(Graphics *gfx, const Matrix4 &m) override;
void drawInstanced(Graphics *gfx, const Matrix4 &m, int instancecount);
static bool getConstant(const char *in, DrawMode &out);
static bool getConstant(DrawMode in, const char *&out);
@@ -223,6 +223,8 @@ 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;
static size_t getAttribFormatSize(const AttribFormat &format);
static std::vector<AttribFormat> getDefaultVertexFormat();