r600: don't enable depth test if there is no depth buffer
[mesa.git] / progs / openvg / trivial / clear.c
1 #include "eglcommon.h"
2
3 #include <VG/openvg.h>
4 #include <stdio.h>
5
6 float red_color[4] = {1.0, 0.0, 0.0, 1.0};
7 float blue_color[4] = {0.0, 0.0, 1.0, 1.0};
8
9 static void
10 init(void)
11 {
12 }
13
14 /* new window size or exposure */
15 static void
16 reshape(int w, int h)
17 {
18 vgLoadIdentity();
19 }
20
21 static void
22 draw(void)
23 {
24 VGint scissor[4] = {100, 100, 25, 25};
25 vgSetfv(VG_CLEAR_COLOR, 4, red_color);
26 vgClear(0, 0, window_width(), window_height());
27
28 vgSetfv(VG_CLEAR_COLOR, 4, blue_color);
29 vgClear(50, 50, 50, 50);
30
31 //vgSetiv(VG_SCISSOR_RECTS, 4, scissor);
32 //vgSeti(VG_SCISSORING, VG_TRUE);
33 vgCopyPixels(100, 100, 50, 50, 50, 50);
34 vgClear(150, 150, 50, 50);
35 }
36
37
38 int main(int argc, char **argv)
39 {
40 return run(argc, argv, init, reshape,
41 draw, 0);
42 }