summaryrefslogtreecommitdiff
path: root/drivers/gles2/rasterizer_gles2.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2015-01-02 22:34:22 -0300
committerJuan Linietsky <reduzio@gmail.com>2015-01-02 22:34:22 -0300
commitd722537154cd87dca134e7055aa2bfdc187eb1b0 (patch)
treefe55aa815802d2b8c5628e2f160fc7a625f559e2 /drivers/gles2/rasterizer_gles2.cpp
parent7a5a4d135e127416c2a2fadcedc9bf5e7a13b37d (diff)
-proper minimum size computation for TabContainer
Diffstat (limited to 'drivers/gles2/rasterizer_gles2.cpp')
-rw-r--r--drivers/gles2/rasterizer_gles2.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gles2/rasterizer_gles2.cpp b/drivers/gles2/rasterizer_gles2.cpp
index 0072ca9c86..ccbba2f51c 100644
--- a/drivers/gles2/rasterizer_gles2.cpp
+++ b/drivers/gles2/rasterizer_gles2.cpp
@@ -8188,14 +8188,17 @@ void RasterizerGLES2::canvas_draw_polygon(int p_vertex_count, const int* p_indic
}
if (p_indices) {
-
- static const int _max_draw_poly_indices = 8*1024; // change this size if needed!!!
+#ifdef GLEW_ENABLED
+ glDrawElements(GL_TRIANGLES, p_vertex_count, GL_UNSIGNED_INT, p_indices );
+#else
+ static const int _max_draw_poly_indices = 16*1024; // change this size if needed!!!
ERR_FAIL_COND(p_vertex_count > _max_draw_poly_indices);
static uint16_t _draw_poly_indices[_max_draw_poly_indices];
for (int i=0; i<p_vertex_count; i++) {
_draw_poly_indices[i] = p_indices[i];
};
glDrawElements(GL_TRIANGLES, p_vertex_count, GL_UNSIGNED_SHORT, _draw_poly_indices );
+#endif
//glDrawElements(GL_TRIANGLES, p_vertex_count, GL_UNSIGNED_INT, p_indices );
} else {
glDrawArrays(GL_TRIANGLES,0,p_vertex_count);