Advertisement

Transparency and speed of rendering

Started by February 01, 2001 10:59 AM
1 comment, last by hamzat 23 years, 9 months ago
Hi all, I implemented the transparency in OpenGL (all triangles in my figure are semitransparent)using the depth sorting, but I have to rebuild the bsp tree after each rotation and I draw them with glBegin(GL_TRIANGLES); glEnd(); It''s very slow. 40 times drop in speed comparing to the version where I used no transparency. I tried to make each time the array to use glVertexPointer, glDrawArrays and other stuff,but it became even slower. Please could you tell me how to increase the speed of rendering. Thank you in advance.
the reason its slow is not because of how u draw them eg with begin..end, display lists or draw elements its cause u rebuild the bsp each time u move

best answer dont sort them (quake doesnt + do u notice , well yes u do )
perhaps just do a simple distance test for each transparent tri and draw them in that order (should be quicker than building a bsp)

http://members.xoom.com/myBollux
Advertisement
Actually my point of view is staic while objects move in the world but the relation between objects, number of objects and other stuff doesn''t change. So after each rotation I have to rebuild the bsp tree because I don''t know how to make minor changes in the bsp-tree and make it correct again for depth sorting.I understand that probably it''s the main reason for drop in speed but how can I reuse the depth sorted triangles in previous frame for next frame?
BTW I build the bsp-tree using stl multimaps and depth sort them by using as a key the distance from the centre of medians to the point of view. Is it correct?

This topic is closed to new replies.

Advertisement