Jump to content
  • Advertisement
Sign in to follow this  
Slug

OpenGL Need help with fog extension...(solved)

This topic is 4852 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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]

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!