summaryrefslogtreecommitdiff
path: root/progs/egl/openvg/trivial/star-nonzero.c
diff options
context:
space:
mode:
authorChia-I Wu <olv@lunarg.com>2010-05-21 22:12:32 -0600
committerChia-I Wu <olv@lunarg.com>2010-05-21 22:13:32 -0600
commite8d8ea2a3962cc07244906f2a3858b4f1b144721 (patch)
treef621a504ccb179c01bf86cd4054bab4b7dbaa356 /progs/egl/openvg/trivial/star-nonzero.c
parentab780bccb737e0dc25a55b5e54faad9c4a790ac0 (diff)
progs: Remove remaining EGL demos.
They have been moved to git+ssh://git.freedesktop.org/git/mesa/demos.
Diffstat (limited to 'progs/egl/openvg/trivial/star-nonzero.c')
-rw-r--r--progs/egl/openvg/trivial/star-nonzero.c55
1 files changed, 0 insertions, 55 deletions
diff --git a/progs/egl/openvg/trivial/star-nonzero.c b/progs/egl/openvg/trivial/star-nonzero.c
deleted file mode 100644
index 012fbd3929..0000000000
--- a/progs/egl/openvg/trivial/star-nonzero.c
+++ /dev/null
@@ -1,55 +0,0 @@
-#include "eglcommon.h"
-
-#include <VG/openvg.h>
-
-const VGfloat white_color[4] = {1.0, 1.0, 1.0, 1.0};
-const VGfloat green_color[4] = {0.0, 1.0, 0.0, 0.8};
-
-VGPath path;
-VGPaint fill;
-
-
-static void
-init(void)
-{
- static const VGubyte cmds[6] = {VG_MOVE_TO_ABS, VG_LINE_TO_ABS, VG_LINE_TO_ABS, VG_LINE_TO_ABS,
- VG_LINE_TO_ABS, VG_CLOSE_PATH};
- static const VGfloat coords[] = { 0, 200,
- 300, 200,
- 50, 0,
- 150, 300,
- 250, 0};
- path = vgCreatePath(VG_PATH_FORMAT_STANDARD, VG_PATH_DATATYPE_F, 1, 0, 0, 0,
- VG_PATH_CAPABILITY_APPEND_TO);
- vgAppendPathData(path, 6, cmds, coords);
-
- fill = vgCreatePaint();
- vgSetParameterfv(fill, VG_PAINT_COLOR, 4, green_color);
- vgSetPaint(fill, VG_FILL_PATH);
-
- vgSetfv(VG_CLEAR_COLOR, 4, white_color);
- vgSeti(VG_FILL_RULE, VG_NON_ZERO);
-}
-
-/* new window size or exposure */
-static void
-reshape(int w, int h)
-{
- vgLoadIdentity();
-}
-
-static void
-draw(void)
-{
- vgClear(0, 0, window_width(), window_height());
- vgDrawPath(path, VG_FILL_PATH | VG_STROKE_PATH);
-
- vgFlush();
-}
-
-
-int main(int argc, char **argv)
-{
- return run(argc, argv, init, reshape,
- draw, 0);
-}