diff options
author | Vitaliy <numzer0@yandex.ru> | 2023-04-08 20:08:03 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-08 19:08:03 +0200 |
commit | aa1696a7e6a275e613e7323e7f9553b7b7a0b7e0 (patch) | |
tree | d176b0c1d865544a82e1f02a3390289d8322acb6 /source/Irrlicht/OpenGL/Driver.h | |
parent | e01f285c8fee31bffa4b34dc8a393085f2d0d143 (diff) | |
download | irrlicht-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.h | 5 |
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); |