From 3a3c0310817b03f1874c9a1faef27e4850106b7f Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Thu, 8 Mar 2018 20:25:14 +0100 Subject: [PATCH] fixed Android slowdown --- polygons.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/polygons.cpp b/polygons.cpp index 4bb7b2ad..e0a37794 100644 --- a/polygons.cpp +++ b/polygons.cpp @@ -268,8 +268,19 @@ void gldraw(int useV, const transmatrix& V, const vector& v, int ps, i #endif } else { - glhr::vertices(v); glhr::be_nontextured(); + + #if !ISANDROID + glhr::vertices(v); + #else + if(glhr::current_vertices != &v[ps]) { + glhr::current_vertices = &v[ps]; + glVertexAttribPointer(glhr::aPosition, 3, GL_FLOAT, GL_FALSE, sizeof(glvertex), &v[ps]); + // glVertexPointer(3, GL_FLOAT, sizeof(glvertex), &v[ps]); + // glhr::vertices(v); + } + ps = 0; + #endif } for(int ed = stereo::active() ? -1 : 0; ed<2; ed+=2) {