diff options
author | Przemyslaw Czarnota <x2n404@gmail.com> | 2017-12-13 07:42:33 +0100 |
---|---|---|
committer | Przemyslaw Czarnota <x2n404@gmail.com> | 2017-12-13 07:45:24 +0100 |
commit | 08c8d465937b1b20e869c45a39eddcec656baafb (patch) | |
tree | 252f9c5e3c4ccdc1a6e7c2a8d8227c0057973239 /drivers/gles3/rasterizer_scene_gles3.cpp | |
parent | c68b031b052467096a6d8f059e791facb09d82fa (diff) |
Fix #14564 ImmediateGeometry normals act strangely compared to SurfaceTool
Diffstat (limited to 'drivers/gles3/rasterizer_scene_gles3.cpp')
-rw-r--r-- | drivers/gles3/rasterizer_scene_gles3.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gles3/rasterizer_scene_gles3.cpp b/drivers/gles3/rasterizer_scene_gles3.cpp index d38ec2a1f9..663d9e6aba 100644 --- a/drivers/gles3/rasterizer_scene_gles3.cpp +++ b/drivers/gles3/rasterizer_scene_gles3.cpp @@ -1557,7 +1557,7 @@ void RasterizerSceneGLES3::_render_geometry(RenderList::Element *e) { glEnableVertexAttribArray(VS::ARRAY_NORMAL); glBufferSubData(GL_ARRAY_BUFFER, buf_ofs, sizeof(Vector3) * vertices, c.normals.ptr()); - glVertexAttribPointer(VS::ARRAY_NORMAL, 3, GL_FLOAT, false, sizeof(Vector3) * vertices, ((uint8_t *)NULL) + buf_ofs); + glVertexAttribPointer(VS::ARRAY_NORMAL, 3, GL_FLOAT, false, sizeof(Vector3), ((uint8_t *)NULL) + buf_ofs); buf_ofs += sizeof(Vector3) * vertices; } else { @@ -1569,7 +1569,7 @@ void RasterizerSceneGLES3::_render_geometry(RenderList::Element *e) { glEnableVertexAttribArray(VS::ARRAY_TANGENT); glBufferSubData(GL_ARRAY_BUFFER, buf_ofs, sizeof(Plane) * vertices, c.tangents.ptr()); - glVertexAttribPointer(VS::ARRAY_TANGENT, 4, GL_FLOAT, false, sizeof(Plane) * vertices, ((uint8_t *)NULL) + buf_ofs); + glVertexAttribPointer(VS::ARRAY_TANGENT, 4, GL_FLOAT, false, sizeof(Plane), ((uint8_t *)NULL) + buf_ofs); buf_ofs += sizeof(Plane) * vertices; } else { |