- Home /
Question by
miketucker · Oct 06, 2011 at 05:32 PM ·
shaderioswireframees2.0
Efficient Way to Draw Wireframes (OpenGL ES 2.0, iOS)
I'd like to draw wireframe meshes as efficiently as possible on the device.
I stumbled on the GL package and decided to attempt to bypass the mesh renderer (see below).
However, I have not noticed any performance jump. Does anyone have recommendations? GL.Lines is usually very fast in raw OpenGL. Can I use VBOs or something similar?
function OnRenderObject()
GL.Color(Color.white);
GL.Begin(GL.LINES);
for (var i:int = 0; i < points.length / 3; i++) {
GL.Vertex(points[i * 3]);
GL.Vertex(points[i * 3 + 1]);
GL.Vertex(points[i * 3 + 1]);
GL.Vertex(points[i * 3 + 2]);
GL.Vertex(points[i * 3 + 2]);
GL.Vertex(points[i * 3]);
}
thanks in advance.
Comment