aboutsummaryrefslogtreecommitdiff
path: root/source/Irrlicht/OpenGL/Driver.h
diff options
context:
space:
mode:
authorVitaliy <numzer0@yandex.ru>2023-04-08 20:08:03 +0300
committerGitHub <noreply@github.com>2023-04-08 19:08:03 +0200
commitaa1696a7e6a275e613e7323e7f9553b7b7a0b7e0 (patch)
treed176b0c1d865544a82e1f02a3390289d8322acb6 /source/Irrlicht/OpenGL/Driver.h
parente01f285c8fee31bffa4b34dc8a393085f2d0d143 (diff)
downloadirrlicht-aa1696a7e6a275e613e7323e7f9553b7b7a0b7e0.tar.xz
Use a buffer for quads indices
also use glDrawRangeElements for quad drawing
Diffstat (limited to 'source/Irrlicht/OpenGL/Driver.h')
-rw-r--r--source/Irrlicht/OpenGL/Driver.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/Irrlicht/OpenGL/Driver.h b/source/Irrlicht/OpenGL/Driver.h
index c91ccfe..84cc62b 100644
--- a/source/Irrlicht/OpenGL/Driver.h
+++ b/source/Irrlicht/OpenGL/Driver.h
@@ -331,7 +331,7 @@ namespace video
void drawQuad(const VertexType &vertexType, const S3DVertex (&vertices)[4]);
void drawArrays(GLenum primitiveType, const VertexType &vertexType, const void *vertices, int vertexCount);
- void drawElements(GLenum primitiveType, const VertexType &vertexType, const void *vertices, const u16 *indices, int indexCount);
+ void drawElements(GLenum primitiveType, const VertexType &vertexType, const void *vertices, int vertexCount, const u16 *indices, int indexCount);
void drawElements(GLenum primitiveType, const VertexType &vertexType, uintptr_t vertices, uintptr_t indices, int indexCount);
void beginDraw(const VertexType &vertexType, uintptr_t verticesBase);
@@ -386,7 +386,8 @@ private:
void addDummyMaterial(E_MATERIAL_TYPE type);
- std::vector<u16> QuadsIndices;
+ unsigned QuadIndexCount;
+ GLuint QuadIndexBuffer = 0;
void initQuadsIndices(int max_vertex_count = 65536);
void debugCb(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *message);