Jump to content
  • Advertisement

Archived

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

Antoxa

Polygons with alpha-channel. How to draw correctly?

This topic is 6089 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, guys! I am writing my new 3D game with OpenGL. In this game will be a lot of explosions, fireballs and some other beautiful effects which need alpha-blending. And for correct scene rendering I need to sort these alpha-polygons out to draw them in back-to-front order. Is there any fast method to do this kind of sorting? Sorry for my english Thanks!

Share this post


Link to post
Share on other sites
Advertisement
qsort can be used, it is in an ansi header file, forget which one. Sort by square of distance x^2+y^2+z^2.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!