diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-11-19 09:36:30 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-19 09:36:30 +0100 |
commit | 6536105af26bb3a6a18369b4647ac479816090b7 (patch) | |
tree | 160708a1ad9a4c6715b1bf665c26212693166937 /drivers/gles2/rasterizer_scene_gles2.cpp | |
parent | cc3b7d2ee2bcd0a4f8f88421fcdca6436b2416b1 (diff) | |
parent | 1253a3342381e15ff95074f31a465a18e6459991 (diff) |
Merge pull request #33527 from clayjohn/GLES2-bufferdata_optimization
Improve glBufferSubData usage where safe
Diffstat (limited to 'drivers/gles2/rasterizer_scene_gles2.cpp')
-rw-r--r-- | drivers/gles2/rasterizer_scene_gles2.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gles2/rasterizer_scene_gles2.cpp b/drivers/gles2/rasterizer_scene_gles2.cpp index 1deecbf3cc..bc47fb46f5 100644 --- a/drivers/gles2/rasterizer_scene_gles2.cpp +++ b/drivers/gles2/rasterizer_scene_gles2.cpp @@ -2702,7 +2702,7 @@ void RasterizerSceneGLES2::_draw_sky(RasterizerStorageGLES2::Sky *p_sky, const C } glBindBuffer(GL_ARRAY_BUFFER, state.sky_verts); - glBufferSubData(GL_ARRAY_BUFFER, 0, sizeof(Vector3) * 8, vertices); + glBufferData(GL_ARRAY_BUFFER, sizeof(Vector3) * 8, vertices, GL_DYNAMIC_DRAW); // bind sky vertex array.... glVertexAttribPointer(VS::ARRAY_VERTEX, 3, GL_FLOAT, GL_FALSE, sizeof(Vector3) * 2, 0); |