Compute/setup fog coordinates even if vertex program is enabled.
Only when fog's enabled, of course. In the usual case, this is just a pass-through operation.
This commit is contained in:
@@ -199,11 +199,11 @@ const struct tnl_pipeline_stage *_tnl_default_pipeline[] = {
|
|||||||
&_tnl_vertex_transform_stage,
|
&_tnl_vertex_transform_stage,
|
||||||
&_tnl_normal_transform_stage,
|
&_tnl_normal_transform_stage,
|
||||||
&_tnl_lighting_stage,
|
&_tnl_lighting_stage,
|
||||||
&_tnl_fog_coordinate_stage,
|
|
||||||
&_tnl_texgen_stage,
|
&_tnl_texgen_stage,
|
||||||
&_tnl_texture_transform_stage,
|
&_tnl_texture_transform_stage,
|
||||||
&_tnl_point_attenuation_stage,
|
&_tnl_point_attenuation_stage,
|
||||||
&_tnl_vertex_program_stage,
|
&_tnl_vertex_program_stage,
|
||||||
|
&_tnl_fog_coordinate_stage,
|
||||||
&_tnl_render_stage,
|
&_tnl_render_stage,
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
@@ -148,11 +148,11 @@ run_fog_stage(GLcontext *ctx, struct tnl_pipeline_stage *stage)
|
|||||||
struct fog_stage_data *store = FOG_STAGE_DATA(stage);
|
struct fog_stage_data *store = FOG_STAGE_DATA(stage);
|
||||||
GLvector4f *input;
|
GLvector4f *input;
|
||||||
|
|
||||||
if (!ctx->Fog.Enabled || ctx->VertexProgram._Current)
|
|
||||||
|
if (!ctx->Fog.Enabled)
|
||||||
return GL_TRUE;
|
return GL_TRUE;
|
||||||
|
|
||||||
|
if (ctx->Fog.FogCoordinateSource == GL_FRAGMENT_DEPTH_EXT && !ctx->VertexProgram._Current) {
|
||||||
if (ctx->Fog.FogCoordinateSource == GL_FRAGMENT_DEPTH_EXT) {
|
|
||||||
GLuint i;
|
GLuint i;
|
||||||
GLfloat *coord;
|
GLfloat *coord;
|
||||||
/* Fog is computed from vertex or fragment Z values */
|
/* Fog is computed from vertex or fragment Z values */
|
||||||
|
Reference in New Issue
Block a user