On Mon, 21 May 2012 23:15:19 -0700, Chad Versace <[email protected]> 
wrote:
> +void
> +glutInitAPIMask(int mask)
> +{
> +     switch (mask) {
> +             case GLUT_OPENGL_BIT:
> +                     _glut->waffle_context_api = WAFFLE_CONTEXT_OPENGL;
> +                     break;
> +             case GLUT_OPENGL_ES1_BIT:
> +                     _glut->waffle_context_api = WAFFLE_CONTEXT_OPENGL_ES1;
> +                     break;
> +             case GLUT_OPENGL_ES2_BIT:
> +                     _glut->waffle_context_api = WAFFLE_CONTEXT_OPENGL_ES2;
> +                     break;
> +             default:
> +                     glutFatal("api_mask has bad value %#x", mask);
> +                     break;
> +     }
> +}

Wow, I never caught this before.  piglit introduces new functions in the
glut namespace?  That's evil.

> +     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);
> +     } else {
> +             ADD_ATTR(WAFFLE_RED_SIZE,    WAFFLE_DONT_CARE);
> +             ADD_ATTR(WAFFLE_GREEN_SIZE,  WAFFLE_DONT_CARE);
> +             ADD_ATTR(WAFFLE_BLUE_SIZE,   WAFFLE_DONT_CARE);
> +     }

Isn't not specifying the attrib equivalent to DONT_CARE?  Otherwise,
what's the point of this varargsy initialization scheme?

> +     // FIXME: Tests run without -auto require basic input.
> +
> +     // Workaround for input:
> +     // Since glut_waffle doesn't handle input yet, it sleeps in order to
> +     // give the user a chance to see the test output. If the user wishes
> +     // the test to sleep for a shorter or longer time, he can use Ctrl-C
> +     // or Ctrl-Z.
> +     sleep(20);
> +}

I think this is the part of this series that I'm least excited about
right now.  Getting "press escape or q or whatever to exit" into place
should be easy on GLX at least, right?

Attachment: pgpfiC3hVYoxC.pgp
Description: PGP signature

_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to