mirror of
https://github.com/love2d/love.git
synced 2026-08-17 11:00:31 +02:00
love.graphics: move more platform-independent code out of the opengl backend
--HG-- branch : minor
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user