hello,
i am trying to use this fog extension, but it don?t works right … i think.
i have tried to render a cube (with one side open) and gave every vertex
of the cube a fog value with glFogCoordfEXT(…). when rendering the cube
only the faces are shaded. but should not be the hole cube filled with fog?
has any body some idea what i am doing wrong or did i unterstand the
extension wrong?
thanks,
poons
maybe some code is usefull:
PFNGLFOGCOORDFEXTPROC glFogCoordfEXT = NULL;
glFogCoordfEXT=(PFNGLFOGCOORDFEXTPROC)wglGetProcAddress(“glFogCoordfEXT”);
…
glEnable(GL_FOG);
glFogi(GL_FOG_MODE,GL_LINEAR);
glFogfv(GL_FOG_COLOR, fogColor);
glFogf(GL_FOG_START,1.0f);
glFogf(GL_FOG_END,0.0f);
glFogi(GL_FOG_COORDINATE_SOURCE_EXT,GL_FOG_COORDINATE_EXT);
…
glDisable(GL_TEXTURE_2D);
glColor4f(1.0f,1.0f,1.0f,1.0f);
glEnable(GL_BLEND);
glBegin(GL_QUADS);
glFogCoordfEXT(0.0f);glVertex3f(-4000,0,-4000);
glFogCoordfEXT(0.0f);glVertex3f(-4000,0,-4000+200);
glFogCoordfEXT(0.0f);glVertex3f(-4000+200,0,-4000+200);
glFogCoordfEXT(0.0f);glVertex3f(-4000+200,0,-4000);
…