TINYGL: properly handle color for FLAT mode and lines drawing. Respect FLAT/SMOOTH mode for triangle drawing
This commit is contained in:
parent
26b0a7f614
commit
9a81f8997c
6 changed files with 74 additions and 117 deletions
|
@ -251,9 +251,8 @@ void gl_shade_vertex(GLContext *c, GLVertex *v) {
|
|||
vcoord.Z = v->ec.Z;
|
||||
vcoord.normalize();
|
||||
s.X = d.X - vcoord.X;
|
||||
s.Y = d.Y - vcoord.X;
|
||||
s.Z = d.Z - vcoord.X;
|
||||
//NOTE: this operation is rather suspicious, this code should be tested.
|
||||
s.Y = d.Y - vcoord.Y;
|
||||
s.Z = d.Z - vcoord.Z;
|
||||
} else {
|
||||
s.X = d.X;
|
||||
s.Y = d.Y;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue