Line Speed drawing under Ogles 1.0 + 2700G

I’m making a benchmark under Ogles 1.0 with 2700G

The scene is a typical map drawing… some areas for a total of 29K triangles and 11K vertex… and some of this area contours.

Initially I make a lot of calls (800) to the drawElement to draw lines using GL_LINE_STRIP… but performance were not good… much worst than triangles… and we thought the problem was the number of calls to the primitive.
To avoid this I created a single array drawn using GL_LINES… in this way I have to repeat a lot of vertexes but I can simulate the pen up and i can call the DrawElement only one time.
The performance gain is significant, but related to triangles speed it seems not enough.

I also made a test to draw line as triangles, but if I do in this way, when the triangle collapse, it disappears… instead the line, if drawn it never disappears…

29K triangles, 11K vertex
40 millis

6.5K vertex, line width 1.0
50 millis

How can I draw line quickly ?

No one could help me ?

Triangles need to have an area to be drawn, there is no way around this. Lines are drawn as two triangles in hardware, and they’re given a width by the hardware by displacing the vertices along the “line normal” by half the line width, in both directions.

You could do this manually and generate a single triangle strip from your line strips (using two degenerate triangles to “connect” the line strips). Note that you would have to update the vertices when you zoom in or out, if you want a constant line width in screen space.

Thanks Xmas…
Now the speed is increased and also the “resize” function is quick.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.