Need help with fog extension...(solved)

Started by
2 comments, last by Slug 18 years, 8 months ago
Hi, i've been trying to make the FOG_COORDINATE_ARRAY_EXT thing and i think i'm almost done, but for now, it only make some weird gray spot on the geometry. Here the code i've use: In my ".h", there is: typedef void (APIENTRY * PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stride, const GLvoid *pointer); PFNGLFOGCOORDPOINTEREXTPROC glFogCoordPointer; in my OpenGL Init., there is: glFogCoordPointer = (PFNGLFOGCOORDPOINTEREXTPROC) wglGetProcAddress("glFogCoordPointer"); // Set Up Fog glEnable(GL_FOG); glFogi(GL_FOG_MODE, GL_LINEAR); glFogfv(GL_FOG_COLOR, FogColor); glFogf(GL_FOG_START, 0.0f); glFogf(GL_FOG_END, 1.0f); glHint(GL_FOG_HINT, GL_NICEST); glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FOG_COORDINATE_EXT); and in my render code, i've call //Terrain.pFogVert is an array of float glFogCoordPointer(GL_FLOAT, 0, Terrain.pFogVerts); What's wrong? Did i've forgot something? [Edited by - Slug on August 8, 2005 1:20:21 PM]
Advertisement
what are your geometry measurements?

in quakeengines the player height is usually 72.0f

soa good value for the near fog coordinate was 256.0f and far coordinate(GL_FOG_END) was 4096.0f

http://www.8ung.at/basiror/theironcross.html
I'm trying to do per-vertex fog...
Sorry for bothering you, think i've fixed it!

This topic is closed to new replies.

Advertisement