Advertisement

Optimisation questions

Started by March 29, 2003 10:11 AM
12 comments, last by Lukerd 21 years, 11 months ago
One thing.. why would you want to draw from back->front? Unless you''re not using a z-buffer, this is a really bad idea. It is MUCH more efficient to draw front -> back, because if something is occluded, it''s only a z test, and no writes, the other way around, it does the z-test, and it''ll almost always be in front, so it has to draw the pixel, and write out to the z-buffer for however many over-draws happens, the front -> back, it only writes out the first part, and only needs the z-check for the over-draws.
Sorry thats probably what I meant, I read that it needed to be sorted for occlusion culling and when I wrote that I wasnt thinking

Hyperdev

"To err is human, to really mess up requires a computer"
"To err is human, to really mess up requires a computer"
Advertisement
quote:
Original post by _DarkWIng_

snisarenko : boolean flags are very bad desing for modern HW. you should never touch individual triangles.. just chunks of them. the biger chunks the better.

[edited by - _DarkWIng_ on March 30, 2003 2:06:19 PM]


Ok I am new at this and I am also starting to write an engine so could you explain in a little more detail "drawing chunks" ? When you draw a chunk of geometry u still go through every poly...or do you ? I would really like to know in more detail. Are we talking about vertex arrays ? I haven't tried those yet. Maybe explain how vertex arrays work.

Any detailed explanation would be helpful ... thanx

quote:
Original post by QWERTY
Adding a flag to each poly is bad idea. This way you have to draw each poly separately what would be very slow. Instead store your geometry in one big array and use VAR or VAO if possible.

[edited by - QWERTY on March 30, 2003 3:09:02 PM]


What does VAR and VAO stand for ????? Vertex array extensions ???
:?

[edited by - snisarenko on March 30, 2003 10:50:34 PM]
snisarenko : by chunks of geometry i was thinking of vertex arrays with a bunch of triangles that use the same shader. you draw them all at once with one gl command.

VAR = vertex array range (nVidia)
VAO = vertex array object (ATi)
VAR + VAO = VBO = vertex buffer object (ARB)
Since you are starting to learn about this you can just about forget about VAR & VAO and use only VBO since it''s not vendor specific
You should never let your fears become the boundaries of your dreams.

This topic is closed to new replies.

Advertisement