void {@native glVertex2f}(GLfloat x, GLfloat y);
390391392393394395396397398399400
p = t.getPoint(2); c = t.getColor(2); if(c == null) c = color; gl.glColor4f(c.x, c.y, c.z, c.w); gl.glVertex2f(p.x, p.y); p = t.getPoint(0); c = t.getColor(0); if(c == null) c = color; gl.glColor4f(c.x, c.y, c.z, c.w);
396397398399400401402403404405406
p = t.getPoint(0); c = t.getColor(0); if(c == null) c = color; gl.glColor4f(c.x, c.y, c.z, c.w); gl.glVertex2f(p.x, p.y); } // reset color; applyColor(); } else { for(int i = 0; i < triangles.length; i++) {
406407408409410411412413414415416
for(int i = 0; i < triangles.length; i++) { Triangle t = triangles[i]; if(t == null) continue; p = t.getPoint(0); gl.glVertex2f(p.x, p.y); p = t.getPoint(1); gl.glVertex2f(p.x, p.y); p = t.getPoint(1);
409410411412413414415416417418419
p = t.getPoint(0); gl.glVertex2f(p.x, p.y); p = t.getPoint(1); gl.glVertex2f(p.x, p.y); p = t.getPoint(1); gl.glVertex2f(p.x, p.y); p = t.getPoint(2);
412413414415416417418419420421422
p = t.getPoint(1); gl.glVertex2f(p.x, p.y); p = t.getPoint(1); gl.glVertex2f(p.x, p.y); p = t.getPoint(2); gl.glVertex2f(p.x, p.y); p = t.getPoint(2);
415416417418419420421422423424425
p = t.getPoint(1); gl.glVertex2f(p.x, p.y); p = t.getPoint(2); gl.glVertex2f(p.x, p.y); p = t.getPoint(2); gl.glVertex2f(p.x, p.y); p = t.getPoint(0);
418419420421422423424425426427428
p = t.getPoint(2); gl.glVertex2f(p.x, p.y); p = t.getPoint(2); gl.glVertex2f(p.x, p.y); p = t.getPoint(0); gl.glVertex2f(p.x, p.y); } }
421422423424425426427428429430431
p = t.getPoint(2); gl.glVertex2f(p.x, p.y); p = t.getPoint(0); gl.glVertex2f(p.x, p.y); } } } public void fillTriangles(Triangle[] triangles, boolean useColors) {
444445446447448449450451452453454
p = t.getPoint(0); c = t.getColor(0); if(c == null) c = color; gl.glColor4f(c.x, c.y, c.z, c.w); gl.glVertex2f(p.x, p.y); p = t.getPoint(1); c = t.getColor(1); if(c == null) c = color; gl.glColor4f(c.x, c.y, c.z, c.w);
450451452453454455456457458459460
p = t.getPoint(1); c = t.getColor(1); if(c == null) c = color; gl.glColor4f(c.x, c.y, c.z, c.w); gl.glVertex2f(p.x, p.y); p = t.getPoint(2); c = t.getColor(2); if(c == null) c = color; gl.glColor4f(c.x, c.y, c.z, c.w);