DXGL r222 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r221‎ | r222 | r223 >
Date:21:20, 31 July 2012
Author:admin
Status:new
Tags:
Comment:
Color vertices white when lighting is disabled and vertex color is not specified.
Modified paths:
  • /ddraw/shadergen.cpp (modified) (history)

Diff [purge]

Index: ddraw/shadergen.cpp
@@ -282,6 +282,7 @@
283283 gl_FrontSecondaryColor = (gl_FrontMaterial.specular * specular);\n";
284284 static const char op_colorvert[] = "gl_FrontColor = rgba0.bgra;\n";
285285 static const char op_color2vert[] = "gl_FrontSecondaryColor = rgba1.bgra;\n";
 286+static const char op_colorwhite[] = "gl_FrontColor = vec4(1.0,1.0,1.0,1.0);\n";
286287 static const char op_colorfragout[] = "gl_FragColor = vec4(color,alpha);\n";
287288 static const char op_colorfragin[] = "color = gl_Color.rgb;\n\
288289 alpha = gl_Color.a;\n";
@@ -511,6 +512,7 @@
512513 else
513514 {
514515 if((id>>35)&1) vsrc->append(op_colorvert);
 516+ else vsrc->append(op_colorwhite);
515517 if((id>>36)&1) vsrc->append(op_color2vert);
516518 }
517519 int texindex;