summaryrefslogtreecommitdiff
path: root/progs/openvg/trivial/vguarc.c
diff options
context:
space:
mode:
authorChia-I Wu <olv@lunarg.com>2010-04-01 14:20:24 +0800
committerChia-I Wu <olv@lunarg.com>2010-04-01 22:25:48 +0800
commitfc3ddd4b566380e7684c780450016e3e191a4160 (patch)
tree539e4eb39fb89a9ebb83116deef9c5d5ebc57e4d /progs/openvg/trivial/vguarc.c
parent7f231cab2b7c13ba70d6aa694f74b6d6eee6470f (diff)
progs/openvg: Move OpenVG demos to a subdirectory of progs/egl.
That is, move progs/openvg/demos to progs/egl/openvg, progs/openvg/trivial to progs/egl/openvg/trivial.
Diffstat (limited to 'progs/openvg/trivial/vguarc.c')
-rw-r--r--progs/openvg/trivial/vguarc.c74
1 files changed, 0 insertions, 74 deletions
diff --git a/progs/openvg/trivial/vguarc.c b/progs/openvg/trivial/vguarc.c
deleted file mode 100644
index 8d971d5c09..0000000000
--- a/progs/openvg/trivial/vguarc.c
+++ /dev/null
@@ -1,74 +0,0 @@
-#include "eglcommon.h"
-
-#include <VG/openvg.h>
-#include <VG/vgu.h>
-
-const VGfloat white_color[4] = {1.0, 1.0, 1.0, 1.0};
-const VGfloat color[4] = {0.4, 0.1, 1.0, 1.0};
-
-VGPath path;
-VGPaint paint;
-
-
-static void
-init(void)
-{
- VGfloat clearColor[] = {0.0f, 0.0f, 0.0f, 1.0f};/* black color */
- VGfloat greenColor[] = {0.0f, 1.0f, 0.0f, 1.0f};/* green color */
- VGint arcType = VGU_ARC_OPEN;
- VGfloat x, y, w, h, startAngle, angleExtent;
-
- x = 150;
- y = 150;
- w = 150;
- h = 150;
-#if 0
- startAngle = -540.0f;
- angleExtent = 270.0f;
-#else
- startAngle = 270.0f;
- angleExtent = 90.0f;
-#endif
-
- paint = vgCreatePaint();
-
- vgSetPaint(paint, VG_STROKE_PATH);
- vgSetParameterfv(paint, VG_PAINT_COLOR, 4, greenColor);
- vgSetParameteri( paint, VG_PAINT_TYPE, VG_PAINT_TYPE_COLOR);
- vgSetf(VG_STROKE_LINE_WIDTH, 6.0f);
- vgSeti(VG_RENDERING_QUALITY, VG_RENDERING_QUALITY_NONANTIALIASED);
- vgSetfv(VG_CLEAR_COLOR, 4, clearColor);
-
- path = vgCreatePath(VG_PATH_FORMAT_STANDARD, VG_PATH_DATATYPE_F,
- 1.0f, 0.0f, 0, 0, VG_PATH_CAPABILITY_ALL);
-
- vguArc(path, x, y, w, h, startAngle, angleExtent, arcType);
-
- vgSeti(VG_STROKE_CAP_STYLE, VG_CAP_BUTT);
- vgSeti(VG_STROKE_JOIN_STYLE, VG_JOIN_BEVEL);
- vgSetf(VG_STROKE_MITER_LIMIT, 4.0f);
-}
-
-/* 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_STROKE_PATH);
-
- vgFlush();
-}
-
-
-int main(int argc, char **argv)
-{
- // set_window_size(64, 63);
- return run(argc, argv, init, reshape,
- draw, 0);
-}