help me please

i want to display a transparent object composed by several levels of polygons. Each level is a closed ribbon of gl_triangle_strip ( so that it seems like a stack of cylinders).
i draw my ribbons of gl_strip_triangle with :
for each level
Vertices from 1 to n ;
Vertice 1 ; //to close the ribbon

i use blending :


i saw in the forum, that i should sort the polygons and display them according to their z value. but my problem is here : how can i sort the triangles while :
* i use gl_triangl_strip,
* for the same ribbon of gl_triangle_strip, i have to pass behind or foreward the triangles i have just drawn ;

moreover, my object is composed by nearly 20,000 triangles and i want to perform “real-time”.
how can i sort such a number of triangles and have good performances ?


This is a good question. I also have this problem. How do you sort the triangles?
Another rule is to draw opaque objects fisrt and then transparent ones.

Thanks for your answer.

for the moment i don’t sort the triangles 'cause i don’t know how.
currently, i display opaque object, and then transparent object. but it don’t resolve my problem because when i display a transparent one i have for the same object some polygons front and some behind.
i wondering if it is a good idea to procede with gl_triangle_strip. do you have an idea ?

u wont be able to sort the triangles in a strip. u will have to break the strip up into indivual triangles + use GL_TRIANGLES. also there was a paper recently on the nvidia developer website which might be of interest.

thanks for the information !