summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Faye-Lund <erik.faye-lund@collabora.com>2020-09-08 10:11:00 +0200
committerErik Faye-Lund <erik.faye-lund@collabora.com>2020-09-14 11:05:31 +0000
commit846ec9bf933df27c2484bce550934b75830168d2 (patch)
tree265bb623170d12d5a2e85a97117bc410657f8735
parent8c1bc349f0de68d242bb5af6c8c5d260d01a9470 (diff)
egl: use smooth normals for inner face
glxgears smooth-shades the inner face, so let's do that here as well for visual parity. Reviewed-by: Adam Jackson <ajax@redhat.com>
-rw-r--r--src/egl/opengles2/es2gears.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/egl/opengles2/es2gears.c b/src/egl/opengles2/es2gears.c
index 4a29c8f5..027cc323 100644
--- a/src/egl/opengles2/es2gears.c
+++ b/src/egl/opengles2/es2gears.c
@@ -232,7 +232,12 @@ create_gear(GLfloat inner_radius, GLfloat outer_radius, GLfloat width,
/* Inner face */
START_STRIP;
- QUAD_WITH_NORMAL(4, 6);
+ SET_NORMAL(-c[0], -s[0], 0);
+ v = GEAR_VERT(v, 4, -1);
+ v = GEAR_VERT(v, 4, 1);
+ SET_NORMAL(-c[4], -s[4], 0);
+ v = GEAR_VERT(v, 6, -1);
+ v = GEAR_VERT(v, 6, 1);
END_STRIP;
/* Back face */