Need help with fog extension...(solved)
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]
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
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement