1#include "eglcommon.h" 2 3#include <VG/openvg.h> 4#include <stdio.h> 5 6float red_color[4] = {1.0, 0.0, 0.0, 1.0}; 7float blue_color[4] = {0.0, 0.0, 1.0, 1.0}; 8 9static void 10init(void) 11{ 12} 13 14/* new window size or exposure */ 15static void 16reshape(int w, int h) 17{ 18 vgLoadIdentity(); 19} 20 21static void 22draw(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 38int main(int argc, char **argv) 39{ 40 return run(argc, argv, init, reshape, 41 draw, 0); 42} 43