Implement spritebatch properly.
This commit is contained in:
@@ -18,9 +18,10 @@ typedef enum {
|
||||
typedef struct {
|
||||
int32_t vertexCount;
|
||||
meshprimitivetypegl_t primitiveType;
|
||||
const meshvertex_t *vertices;
|
||||
|
||||
#ifdef DUSK_OPENGL_LEGACY
|
||||
const meshvertex_t *vertices;
|
||||
// Nothing needed
|
||||
#else
|
||||
GLuint vaoId;
|
||||
GLuint vboId;
|
||||
@@ -43,6 +44,20 @@ errorret_t meshInitGL(
|
||||
const meshvertex_t *vertices
|
||||
);
|
||||
|
||||
/**
|
||||
* Flushes the vertices (stored in memory) to the GPU.
|
||||
*
|
||||
* @param mesh Mesh to flush vertices for.
|
||||
* @param vertOffset First vertice index to flush.
|
||||
* @param vertCount Count of vertices to flush.
|
||||
* @return Error state.
|
||||
*/
|
||||
errorret_t meshFlushGL(
|
||||
meshgl_t *mesh,
|
||||
const int32_t vertOffset,
|
||||
const int32_t vertCount
|
||||
);
|
||||
|
||||
/**
|
||||
* Draws a mesh using OpenGL.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user