[Piglit] NOTICE: piglit_{width, height, window_mode} are no longer used

Chad Versace chad.versace at linux.intel.com
Thu Jun 21 13:45:56 PDT 2012


On 06/21/2012 06:50 AM, Brian Paul wrote:
> On 06/20/2012 05:58 PM, Chad Versace wrote:
>> I just committed a series that changes the way test executables should be written. This only affects tests written in C.
>> The variables piglit_width, piglit_height, and piglit_window_mode are no longer used.
>>
>> If you want to write this:
>>
>>      int piglit_width = 256;
>>      int piglit_height = 256;
>>      int piglit_window_mode = GLUT_RGBA;
>>
>> Instead, you should now write this:
>>
>>      PIGLIT_GL_TEST_MAIN(256, 256, GLUT_RGBA)
>>
>> I prefer to place this macro near the top of the source file, immediately below the includes. But it really doesn't
>> matter where it goes.
>>
> 
> But to be clear, the piglit_width and piglit_height vars still exist. They can be read to determine the surface's
> current width/height.

Oh, that's right. I forgot to mention that.

> Do you have any plans to replace them with some sort of function call?

I considered it, and am not opposed to it. But I decided not to becasue I felt that the benefit was insubstantial
compared to the effort needed to make that change.


More information about the Piglit mailing list