Explorar el Código

Fix a two-sided lighting bug (fixes samples/wave.c)

tags/mesa_20090313
Brian hace 17 años
padre
commit
dd235ff1db
Se han modificado 1 ficheros con 8 adiciones y 1 borrados
  1. 8
    1
      src/mesa/state_tracker/st_atom_rasterizer.c

+ 8
- 1
src/mesa/state_tracker/st_atom_rasterizer.c Ver fichero

@@ -110,7 +110,14 @@ static void update_raster_state( struct st_context *st )
* GL_VERTEX_PROGRAM_TWO_SIDE is set). Note the logic here.
*/
if (ctx->VertexProgram._Current) {
raster.light_twoside = ctx->VertexProgram.TwoSideEnabled;
if (ctx->VertexProgram._Enabled) {
/* user-defined program */
raster.light_twoside = ctx->VertexProgram.TwoSideEnabled;
}
else {
/* TNL-generated program */
raster.light_twoside = ctx->Light.Enabled && ctx->Light.Model.TwoSide;
}
}
else if (ctx->Light.Enabled && ctx->Light.Model.TwoSide) {
raster.light_twoside = 1;

Cargando…
Cancelar
Guardar