Saturday, March 30, 2013

[OpenGL] glShadeModel

[Reference] The OpenGL SuperBible

"The other shading model that can be specified with glShadeModel is GL_FLAT for flat shading. Flat
shading means that no shading calculations are performed on the interior of primitives. Generally,
with flat shading, the color of the primitive's interior is the color that was specified for the last
vertex. The only exception is for a GL_POLYGON primitive, in which case the color is that of the first

使用 glShadeModel() 可設定三角形或多邊形內部顏色的著色方式,有二個可使用的參數 GL_SMOOTH 和 GL_FLAT。
GL_SMOOTH 將三角形或多邊形的各個頂點的顏色加以計算,於其內部漸層著色。

No comments:

Post a Comment

phpMyAdmin 無法存取 MariaDB 10 的解決方法