phanie
06-12-2001, 02:59 AM
help me please http://www.opengl.org/discussion_boards/ubb/confused.gif
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 :
glBegin(GL_TRIANGLE_STRIP) ;
for each level
Vertices from 1 to n ;
Vertice 1 ; //to close the ribbon
i use blending :
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
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 ?
thanks http://www.opengl.org/discussion_boards/ubb/smile.gif
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 :
glBegin(GL_TRIANGLE_STRIP) ;
for each level
Vertices from 1 to n ;
Vertice 1 ; //to close the ribbon
i use blending :
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
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 ?
thanks http://www.opengl.org/discussion_boards/ubb/smile.gif