aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChad Versace <chad@chad.versace.us>2012-08-23 15:23:50 -0700
committerChad Versace <chad@chad.versace.us>2012-08-23 16:13:16 -0700
commitb869e34a3b927ce8fa7cd25d56af62d067d6f80d (patch)
tree763d9dad477d166fc08c4b0f4afd007ba9f787a7 /src
parentef949d7eaabc0db7880020b759d346b46f41a82e (diff)
downloadpiglit-b869e34a3b927ce8fa7cd25d56af62d067d6f80d.tar.gz
glut_waffle: Always choose a config with RGBA
It is impossible to not request RGBA because GLUT_RGB and GLUT_RGBA are both 0. That is, (display_mode & (GLUT_RGB | GLUT_RGBA)) is unconditonally true. Signed-off-by: Chad Versace <chad@chad.versace.us>
Diffstat (limited to 'src')
-rw-r--r--src/glut_waffle/glut_waffle.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/glut_waffle/glut_waffle.c b/src/glut_waffle/glut_waffle.c
index 83281fd8..11b21496 100644
--- a/src/glut_waffle/glut_waffle.c
+++ b/src/glut_waffle/glut_waffle.c
@@ -221,15 +221,14 @@ glutChooseConfig(void)
ADD_ATTR(WAFFLE_CONTEXT_API, _glut->waffle_context_api);
- if (_glut->display_mode & (GLUT_RGB | GLUT_RGBA)) {
- ADD_ATTR(WAFFLE_RED_SIZE, 1);
- ADD_ATTR(WAFFLE_GREEN_SIZE, 1);
- ADD_ATTR(WAFFLE_BLUE_SIZE, 1);
- }
-
- if (_glut->display_mode & (GLUT_ALPHA | GLUT_RGBA)) {
- ADD_ATTR(WAFFLE_ALPHA_SIZE, 1);
- }
+ /* It is impossible to not request RGBA because GLUT_RGB and
+ * GLUT_RGBA are both 0. That is, (display_mode & (GLUT_RGB
+ * | GLUT_RGBA)) is unconditonally true.
+ */
+ ADD_ATTR(WAFFLE_RED_SIZE, 1);
+ ADD_ATTR(WAFFLE_GREEN_SIZE, 1);
+ ADD_ATTR(WAFFLE_BLUE_SIZE, 1);
+ ADD_ATTR(WAFFLE_ALPHA_SIZE, 1);
if (_glut->display_mode & GLUT_DEPTH) {
ADD_ATTR(WAFFLE_DEPTH_SIZE, 1);