diff options
Diffstat (limited to 'src/gallium/tests/graw/clear.c')
-rw-r--r-- | src/gallium/tests/graw/clear.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/gallium/tests/graw/clear.c b/src/gallium/tests/graw/clear.c index adcbb08308f..28c986eee64 100644 --- a/src/gallium/tests/graw/clear.c +++ b/src/gallium/tests/graw/clear.c @@ -53,13 +53,20 @@ static void init( void ) struct pipe_resource *tex, templat; int i; + /* It's hard to say whether window or screen should be created + * first. Different environments would prefer one or the other. + * + * Also, no easy way of querying supported formats if the screen + * cannot be created first. + */ for (i = 0; window == NULL && formats[i] != PIPE_FORMAT_NONE; i++) { - window = graw_create_window(0,0,300,300, formats[i]); + screen = graw_create_window_and_screen(0,0,300,300, + formats[i], + &window); } - if (window == NULL) exit(2); @@ -98,15 +105,11 @@ static void init( void ) } + int main( int argc, char *argv[] ) { - screen = graw_init(); - if (screen == NULL) - exit(1); - init(); - graw_set_display_func( draw ); graw_main_loop(); return 0; |