glFogCoordfEXT questions.
just a simple question and a small request
1. what relationship does glFogCoordfEXT have with vertexes you draw.
2. could some one explain how to use glFogCoordfEXT on a height field or point me to some place that EXPLAINS it. I have found some sourse that uses it but I can''t figure out why my try at it does not work.
what I did was I have a single Quad the quad''s four points are
1 ,0, ,1
-1 ,0 ,1
-1 ,0 ,-1
1 ,0, -1
then I MANUALLY rotate them useing my own custom rotate commands then I draw the Vertices with glFogCoordfEXT(-(Y_VALUE_OF_POINT- .1)); in front of it and all I get is a flickering white QUAD I guess I don''t under stand how glFogCoordfEXT works so thats what my problem is.
here is my fog setup
void SetupVoloFog();
{
GLfloat fogColor[4]= {1, 1, 1, 1.0f};
glEnable(GL_FOG);
glFogi(GL_FOG_MODE, GL_LINEAR); glFogfv(GL_FOG_COLOR, fogColor); glFogf(GL_FOG_START, 0.0); glFogf(GL_FOG_END, 50.0); glFogi(GL_FOG_COORDINATE_SOURCE_EXT, GL_FOG_COORDINATE_EXT);
delete(&fogColor);
}
correct me if I''m wrong, but fog coord sets the fogging amount at each vertex, like glColour, or whatnot.. so you don''t rely on generic fogging.
It''s very tough doing this realistically though, and fast, as it would mean recalculating values, which is always going to be slow.
It would have uses though.
note it does not work with NV_VERTEX_ARRAY_RANGE. (I think)
It''s very tough doing this realistically though, and fast, as it would mean recalculating values, which is always going to be slow.
It would have uses though.
note it does not work with NV_VERTEX_ARRAY_RANGE. (I think)
Im not to sure about that in fact im really not worrying about speed I just want to learn how to use glFogCoordfEXT so if I ever want to use it I can.
Sorry for cutting in. Just want to ask if I can use that function for stuff like fog of war?
Well from what I see of its uses Its more a Ground up thing for makeing like a foggy swap or soemthing like that.
quote:Sorry for cutting in. Just want to ask if I can use that function for stuff like fog of war?
quote:Well from what I see of its uses Its more a Ground up thing for makeing like a foggy swap or soemthing like that.
Well, the fog is calculated per-vertex. So for any verticies not currently affected by fog of war you could simply turn the fog off... I think...
------------
aud.vze.com - The Audacious Engine <-- Newbie alert, look at your own risk. Can induce severe laughing fits and other variations of hysterical outburst.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement