summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-12-09 10:04:52 +0100
committerGitHub <noreply@github.com>2019-12-09 10:04:52 +0100
commit2ebc783e9c7c257bb122f8a19e2426193a481aa4 (patch)
tree76501c3304c4a29aea11e5f4be79bff238216158
parente447f5ab044c7b0cbc99d61da34afa9f5e15b349 (diff)
parentcd07a34598e82b21782395ecc9a96ea98330a431 (diff)
Merge pull request #34218 from akien-mga/gles3-unbind-buffers
GLES3: Properly unbind buffers after draw commands
-rw-r--r--drivers/gles3/rasterizer_canvas_gles3.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gles3/rasterizer_canvas_gles3.cpp b/drivers/gles3/rasterizer_canvas_gles3.cpp
index b3263ce41c..c798dff839 100644
--- a/drivers/gles3/rasterizer_canvas_gles3.cpp
+++ b/drivers/gles3/rasterizer_canvas_gles3.cpp
@@ -419,6 +419,7 @@ void RasterizerCanvasGLES3::_draw_polygon(const int *p_indices, int p_index_coun
}
glBindVertexArray(0);
+ glBindBuffer(GL_ARRAY_BUFFER, 0);
}
void RasterizerCanvasGLES3::_draw_generic(GLuint p_primitive, int p_vertex_count, const Vector2 *p_vertices, const Vector2 *p_uvs, const Color *p_colors, bool p_singlecolor) {
@@ -471,6 +472,7 @@ void RasterizerCanvasGLES3::_draw_generic(GLuint p_primitive, int p_vertex_count
storage->frame.canvas_draw_commands++;
glBindVertexArray(0);
+ glBindBuffer(GL_ARRAY_BUFFER, 0);
}
void RasterizerCanvasGLES3::_draw_generic_indices(GLuint p_primitive, const int *p_indices, int p_index_count, int p_vertex_count, const Vector2 *p_vertices, const Vector2 *p_uvs, const Color *p_colors, bool p_singlecolor) {
@@ -543,6 +545,7 @@ void RasterizerCanvasGLES3::_draw_generic_indices(GLuint p_primitive, const int
storage->frame.canvas_draw_commands++;
glBindVertexArray(0);
+ glBindBuffer(GL_ARRAY_BUFFER, 0);
}
void RasterizerCanvasGLES3::_draw_gui_primitive(int p_points, const Vector2 *p_vertices, const Color *p_colors, const Vector2 *p_uvs) {