9 const VGfloat white_color
[4] = {1.0, 1.0, 1.0, 1.0};
10 const VGfloat color
[4] = {1.0, 1.0, 1.0, 0.5};
11 VGfloat clearColor
[] = {1.0f
, 0.0f
, 0.0f
, 1.0f
};/* red color */
19 VGImage child1
, child2
;
24 data
= (VGubyte
*)malloc(sizeof(VGubyte
)*window_width()*window_height());
26 for (i
=0;i
<window_width()*window_height();i
++) {
30 for (i
=0; i
<256; i
++) {
37 parent
= vgCreateImage( VG_A_8
, 64, 64, VG_IMAGE_QUALITY_NONANTIALIASED
);
39 vgImageSubData(parent
, data
, window_width(), VG_A_8
, 0, 0,
40 window_width(), window_height());
41 child1
= vgChildImage(parent
, 0, 0, 32, 64);
42 child2
= vgChildImage(parent
, 32, 0, 32, 64);
44 vgLookupSingle(child2
, child1
, LUT
, VG_GREEN
, VG_FALSE
, VG_TRUE
);
47 /* new window size or exposure */
56 vgSetfv(VG_CLEAR_COLOR
, 4, clearColor
);
57 vgClear(0, 0, window_width(), window_height());
58 //vgSeti(VG_MATRIX_MODE, VG_MATRIX_IMAGE_USER_TO_SURFACE);
60 //vgTranslate(10, 10);
66 int main(int argc
, char **argv
)
68 set_window_size(64, 64);
69 return run(argc
, argv
, init
, reshape
,