PDA

View Full Version : polygon storage class best practices?



revg75
03-19-2010, 03:38 PM
Hi Guys,

I am creating software that will take in building dimensions and properties from a database and create a 3D preview of the building in opengl.

I know that I will need to put windows in the walls in arbitrary locations on a polygon which I am considering using alpha blending or stencil buffer for. I also realize that there is the chance that my transparent polygons may overlap. So for this to work I will need to be able to sort my transparent polygons from back to front and I might have to use ray intersection methods to make it work perfectly.

So my question is, is there a good standard for how I should store my polygons so that my engine will lend itself well to sorting and ray tracing? Does anyone have any tips or polygon storage classes that they could share with me so that I know I will be ok when it comes time to sort and/or do ray tracing?

Thanks,
Greg

revg75
03-21-2010, 05:58 PM
I managed to find a great article on polygon storage. Here is the link in case anyone else finds this useful.

http://nehe.gamedev.net/data/articles/article.asp?article=07

Cheers,
Greg