Cross Reference: clear.c
xref: /xsrc/external/mit/mesa-demos/dist/src/egl/openvg/trivial/clear.c
  • Home
  • History
  • AnnotateAnnotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /xsrc/external/mit/mesa-demos/dist/src/egl/openvg/trivial/
132001f49Smrg#include "eglcommon.h"
232001f49Smrg
332001f49Smrg#include <VG/openvg.h>
432001f49Smrg#include <stdio.h>
532001f49Smrg
632001f49Smrgfloat red_color[4] = {1.0, 0.0, 0.0, 1.0};
732001f49Smrgfloat blue_color[4] = {0.0, 0.0, 1.0, 1.0};
832001f49Smrg
932001f49Smrgstatic void
1032001f49Smrginit(void)
1132001f49Smrg{
1232001f49Smrg}
1332001f49Smrg
1432001f49Smrg/* new window size or exposure */
1532001f49Smrgstatic void
1632001f49Smrgreshape(int w, int h)
1732001f49Smrg{
1832001f49Smrg   vgLoadIdentity();
1932001f49Smrg}
2032001f49Smrg
2132001f49Smrgstatic void
2232001f49Smrgdraw(void)
2332001f49Smrg{
2432001f49Smrg    VGint scissor[4] = {100, 100, 25, 25};
2532001f49Smrg    vgSetfv(VG_CLEAR_COLOR, 4, red_color);
2632001f49Smrg    vgClear(0, 0, window_width(), window_height());
2732001f49Smrg
2832001f49Smrg    vgSetfv(VG_CLEAR_COLOR, 4, blue_color);
2932001f49Smrg    vgClear(50, 50, 50, 50);
3032001f49Smrg
3132001f49Smrg    //vgSetiv(VG_SCISSOR_RECTS, 4, scissor);
3232001f49Smrg    //vgSeti(VG_SCISSORING, VG_TRUE);
3332001f49Smrg    vgCopyPixels(100, 100, 50, 50, 50, 50);
3432001f49Smrg    vgClear(150, 150, 50, 50);
3532001f49Smrg}
3632001f49Smrg
3732001f49Smrg
3832001f49Smrgint main(int argc, char **argv)
3932001f49Smrg{
4032001f49Smrg   return run(argc, argv, init, reshape,
4132001f49Smrg              draw, 0);
4232001f49Smrg}
43

Indexes created Sat Nov 29 09:09:30 GMT 2025