From 78a9fbb9b56bb2f94063d689724af9b68eeafd33 Mon Sep 17 00:00:00 2001 From: Jupeyy Date: Sat, 4 Nov 2017 04:57:58 +0100 Subject: [PATCH] use the write buffer slot, instead of elementarray slot to create the index buffer --- src/engine/client/backend_sdl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine/client/backend_sdl.cpp b/src/engine/client/backend_sdl.cpp index cbfe56f84..f2a8ad5ef 100644 --- a/src/engine/client/backend_sdl.cpp +++ b/src/engine/client/backend_sdl.cpp @@ -763,7 +763,7 @@ void CCommandProcessorFragment_OpenGL3_3::Cmd_Init(const SCommand_Init *pCommand glBindVertexArray(0); glGenBuffers(1, &m_QuadDrawIndexBufferID); - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_QuadDrawIndexBufferID); + glBindBuffer(GL_COPY_WRITE_BUFFER, m_QuadDrawIndexBufferID); m_LastIndexBufferBound = 0; unsigned int Indices[CCommandBuffer::MAX_VERTICES/4 * 6]; @@ -778,7 +778,7 @@ void CCommandProcessorFragment_OpenGL3_3::Cmd_Init(const SCommand_Init *pCommand Indices[i+5] = Primq + 3; Primq+=4; } - glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(unsigned int) * CCommandBuffer::MAX_VERTICES/4 * 6, Indices, GL_STATIC_DRAW); + glBufferData(GL_COPY_WRITE_BUFFER, sizeof(unsigned int) * CCommandBuffer::MAX_VERTICES/4 * 6, Indices, GL_STATIC_DRAW); m_CurrentIndicesInBuffer = CCommandBuffer::MAX_VERTICES/4 * 6;