x


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.

more ▼

asked Oct 06 '11 at 05:32 PM

miketucker gravatar image

miketucker
76 10 11 12

(comments are locked)
10|3000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1968
x1667
x26
x6

asked: Oct 06 '11 at 05:32 PM

Seen: 1732 times

Last Updated: Oct 06 '11 at 05:32 PM