From e76c00c7f4c2940c4d9ed78a9c0d6ac1595e67bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Kapu=C5=9Bci=C5=84ski?= Date: Sat, 22 Jan 2022 01:50:10 +0100 Subject: [PATCH] Fixed the Z coordinate not working in particle renderer --- src/graphics/opengl/gl33particlerenderer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/graphics/opengl/gl33particlerenderer.cpp b/src/graphics/opengl/gl33particlerenderer.cpp index f6792ed2..800bc8c2 100644 --- a/src/graphics/opengl/gl33particlerenderer.cpp +++ b/src/graphics/opengl/gl33particlerenderer.cpp @@ -214,7 +214,7 @@ void CGL33ParticleRenderer::DrawParticle(PrimitiveType type, int count, const Ve glBufferData(GL_ARRAY_BUFFER, m_bufferCapacity, nullptr, GL_STREAM_DRAW); glBufferSubData(GL_ARRAY_BUFFER, 0, size, vertices); - glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, sizeof(Vertex3D), + glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, sizeof(Vertex3D), reinterpret_cast(offsetof(Vertex3D, position))); glVertexAttribPointer(1, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(Vertex3D),