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
+7 -1
View File
@@ -32,6 +32,7 @@
#include "Drawable.h"
#include "Color.h"
#include "Mesh.h"
#include "vertex.h"
namespace love
{
@@ -105,6 +106,9 @@ public:
void setDrawRange();
bool getDrawRange(int &start, int &count) const;
// Implements Drawable.
void draw(Graphics *gfx, const Matrix4 &m) override;
protected:
struct AttachedAttribute
@@ -119,6 +123,8 @@ protected:
**/
void setBufferSize(int newsize);
virtual void drawInternal(vertex::CommonFormat format, size_t indexbytestart, size_t indexcount) = 0;
StrongRef<Texture> texture;
// Max number of sprites in the batch.
@@ -133,7 +139,7 @@ protected:
bool color_active;
vertex::CommonFormat vertex_format;
size_t format_stride;
size_t vertex_stride;
love::graphics::Buffer *array_buf;
QuadIndices quad_indices;