Have you implemented tri-fan support yet? Can't seem to get it to work -- the application hangs when specifying the GL_TRIANGLE_FAN enum to glDrawArrays. The same array works fine with GL_POINTS and GL_LINE_LOOP.
Thanks and keep up the good work! -gw
I'm pretty sure I excercised triangle fans before.
Also looking over the code I cannot see an obvious bug. Does a single triangle using the same other settings work? Do you have a simple example? What bothers me is that the application hangs --- at least it should render some garbage...
Some testing reveals that the app isn't hanging, it's just taking a very long time to render a frame w/ trifans. I did a simple test, rendering a single square w/ code like this:
GLfloat test =
-100, -100, 0,
-100, 100, 0,
100, 100, 0,
100, -100, 0
glVertexPointer( 3, GL_FLOAT, 0, test );
glEnableClientState( GL_VERTEX_ARRAY );
glDrawArrays( GL_LINE_LOOP, 0, 4 );
The rendering time is <1 ms. But if I change GL_LINE_LOOP to GL_TRIANGLE_FAN, the rendering time jumps to 160ms. With 1500 trifans/17000 verts, this looked like a hang at first.
Hope this helps.
I see, so it's just slow... Anyway, 160ms for a quad is a lot.
What build is this (ARM/XScale Debug/Release)?
What kind of device is this?
What features are you using?
Lightning? Smooth coloring? Texturing?
Which buffers are enabled (color, alpha, stencil, depth)?
While optimizations are still on the plan, I wouldn't expect magic given that this is a software implementation... What are the framerates you are getting with the demo application?
Tracked it down. I had the following two calls in my setup:
glLineWidthx( EGL_ONE );
glPointSizex( EGL_ONE );
Removed both of these and the problem went away.
For your reference, here's my config:
ARMv4/XScale Release; Dell Axim X3i, PXA263 400Mhz, PocketPC 2003; GPP; Color buffer only, no lighting, no smoothing, no texturing, no depth test.
Getting 47fps with the car demo.
Ah, I think I figured what the problem is: I'll enter a bug for this. line width and point size or not used, but part of the state, and I do not initialize them in the constructor.
I think what happens is that you'll end up with a recompile of the scanline conversion for every single traingle fan.
I'll enter a bug.
Version 0.76 should fix your problem; let me know if it doesn't. I'd really like to see your example with 17000 vertices... Do you have a screenshot?
Log in to post a comment.