Archived

This topic is now archived and is closed to further replies.

Transparency and speed of rendering

This topic is 6163 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites