mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 22:38:05 +02:00
Fix a two-sided lighting bug (fixes samples/wave.c)
This commit is contained in:
parent
587e2becc2
commit
dd235ff1db
1 changed files with 8 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue