Question about the triangle rendering order

Started by
2 comments, last by Ardor 17 years, 11 months ago
Hi, a question about rendering triangles: if I use a triangle list, and insert 15 triangles in a vertex buffer, sorted in back-front order, can I assume that they will be rendered in that order? This is important for blending; I pre-sort the triangles, then render all of them using only one draw call, and they will be blended correctly. So, can I assume this? Or will this only work with some drivers?
~dv();
Advertisement
When it comes to these graphics APIs, it's always FIFO. So whatever you render first gets shipped through the pipeline first, and anything rendered after that is rendered "on-top" of it.

not sure what specific applications you need this for but bear in mind that it is often enough to just draw your _models_ in back to front order, switching culling to front faces, rendering the 'inside' then switching culling to backfaces and rendering the 'outside'. This is much faster than sorting every individual triangle, but occlusion is not a trivial problem and it depends what exactly you are trying to do.
Geocyte Has Committed Suicide.
The geometry in question is a Q3BSP level. I know, its old, but I have to use it, no options here :) But I dont wanna do a drawcall for every single face, so I prefer to stuff them all presorted in an IB and issue the call only once.

This topic is closed to new replies.

Advertisement