开发者

glFog on iPhone ignores GL_FOG_START?

Maybe I'm missing something, but I can't really see the reason. I've just setup a fog via:

glEnable(GL_FOG);
glFogx(GL_FOG_MODE, GL_LINEAR);
glFogfv(GL_FOG_COLOR, fogColor);
glFogf(GL_FOG_DENSITY, 0.3f);
glHint(GL_FOG_HINT, GL_DONT_CARE);
glFogf(GL_FOG_STA开发者_Python百科RT, 1.5f);
glFogf(GL_FOG_END, 20.0f);

And the fog appeated properly. However, I doesn't seem to take into account GL_FOG_START/GL_FOG_END values, i.e. it doesn't matter which values I set those to – in any case the fog effect starts right in front of the camera, no matter if I specify 1 or 1000 to GL_FOG_START. And what I want to achieve is to have items in the fog well ahead, don't blur near things. Or maybe I just misinterpret these params?

Thank you in advance.


My bad. The thing is working with liner fog only, and I checked only for EXP and EXP2 fogs.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜