Mustan9
12-03-2004, 11:26 AM
Hi,
I'm very interested in knowing which render order is most effective when reducing the state changes in OpenGL.
Which of the following procedures has the best performance in OpenGL?
1) Update perspective view matrix
2) Update lighting changes
3) Update model view matrix changes
4) Update material changes
5) Render triangle fragments
6) Switch to next material, and goto step 4
7) Switch to next model view matrix, and goto step 3
Or this one... (notice lines 3 and 4 are switched around)
1) Update perspective view matrix
2) Update lighting changes
3) Update material changes
4) Update model view matrix changes
5) Render triangle fragments
6) Switch to next model view matrix, and goto step 4
7) Switch to next material, and goto step 3
The reason I ask.
Which state is more common? Material changes or model view changes?
I'm very interested in knowing which render order is most effective when reducing the state changes in OpenGL.
Which of the following procedures has the best performance in OpenGL?
1) Update perspective view matrix
2) Update lighting changes
3) Update model view matrix changes
4) Update material changes
5) Render triangle fragments
6) Switch to next material, and goto step 4
7) Switch to next model view matrix, and goto step 3
Or this one... (notice lines 3 and 4 are switched around)
1) Update perspective view matrix
2) Update lighting changes
3) Update material changes
4) Update model view matrix changes
5) Render triangle fragments
6) Switch to next model view matrix, and goto step 4
7) Switch to next material, and goto step 3
The reason I ask.
Which state is more common? Material changes or model view changes?