]> git.mxchange.org Git - flightgear.git/blob - src/Canvas/ShivaVG/README
Fix a Clang warning in Shiva.
[flightgear.git] / src / Canvas / ShivaVG / README
1 ShivaVG
2 =============================
3
4 See AUTHORS for the list of contributors
5
6 ShivaVG is an open-source LGPL ANSI C implementation of the Khronos
7 Group OpenVG specification.
8
9 I.    BUILD
10 II.   TESTING
11 III.  IMPLEMENTATION STATUS
12 IV.   EXTENSIONS
13
14
15 I. BUILD
16 =============================
17
18  * Prerequisites:
19
20    OpenGL development libraries and headers should be installed.
21    Othe than that, since it's ANSI C should compile with any modern
22    C compiler. jpeglib needs to be installed for example programs
23    that use images.
24
25  * Compiling under UNIX systems:
26
27    Read the INSTALL file for more detailed (though generic) directions.
28    This library uses the standard ./configure ; make. The example
29    programs are automatically compiled. However, compilation of each
30    example program can be toggled by ./configure --with-example-xxx
31    command where xxx denotes the name of the example. Run ./configure
32    --help for a list of such options.
33
34  * Compiling on Mac:
35
36    No XCode project files provided yet. The easiest way is by just
37    using gcc, in which case look under UNIX compiling section.
38
39  * Compiling natively on Windows platform:
40
41    Solution files are provided for Visual C++ version 7 and 8. For
42    the example programs using images to compile, you will need the
43    appropriate build of jpeglib to match your Visual C++ version.
44
45  * Compiling in mingw / cygwin environment:
46
47    Might work just as fine as any UNIX-flavored system, but hasn't
48    been tested yet.
49
50
51 II. TESTING
52 =============================
53
54 There is no real testing suite yet. The example programs are there
55 just to play with what the implementation can currently do, but
56 can hardly provide any proper validation, since no reference images
57 are provided. Here is a description of each example program and
58 what features it highlights:
59
60 * test_vgu
61
62   Constructs some path primitives using the VGU API.
63
64 * test_tiger
65
66   The most simple performance test. It draws the well known svg
67   tiger using just simple stroke and fill of solid colors. It
68   consists of 240 paths.
69
70 * test_dash
71
72   Shows different stroke dashing modes.
73
74 * test_linear
75
76   A rectangle drawn using 3-color linear gradient fill paint
77
78 * test_radial
79
80   A rectangle drawn using 3-color radial gradient fill paint
81
82 * test_interpolate
83
84   Interpolates between two paths - an apple and a pear.
85
86 * test_image
87
88         Images are drawn using VG_DRAW_IMAGE_MULTIPLY image mode to be
89   multiplied with radial gradient fill paint.
90
91 * test_pattern
92
93   An image is drawn in multiply mode with an image pattern fill
94   paint.
95
96
97 III. IMPLEMENTATION STATUS
98 =============================
99
100 Khronos states in the OpenVG specification, that the contexts for all
101 their client APIs are expected to be created via the EGL API. Since
102 EGL to use with ShivaVG has not been implemented yet, there is a set
103 of extension functions provided for the task of creating, maintaining
104 and destroying the OpenVG context. (See next section EXTENSIONS for
105 details.)
106
107 What follows is a description of which functions or to what extent
108 a certain function has been implemented. When a function is marked
109 as PARTIALLY implemented, the TODO file or the comments in the code
110 itself would provide further clues.
111
112
113 * General:
114
115 vgGetError ............................ FULLY implemented
116 vgFlush ............................... FULLY implemented
117 vgFinish .............................. FULLY implemented
118
119 * Getters and setters:
120
121 vgSet ................................. FULLY implemented
122 vgSeti ................................ FULLY implemented
123 vgSetfv ............................... FULLY implemented
124 vgSetiv ............................... FULLY implemented
125 vgGetf ................................ FULLY implemented
126 vgGeti ................................ FULLY implemented
127 vgGetVectorSize ....................... FULLY implemented
128 vgGetfv ............................... FULLY implemented
129 vgGetiv ............................... FULLY implemented
130 vgSetParameterf ....................... FULLY implemented
131 vgSetParameteri ....................... FULLY implemented
132 vgSetParameterfv ...................... FULLY implemented
133 vgSetParameteriv ...................... FULLY implemented
134 vgGetParameterf ....................... FULLY implemented
135 vgGetParameteri ....................... FULLY implemented
136 vgGetParameterVectorSize............... FULLY implemented
137 vgGetParameterfv ...................... FULLY implemented
138 vgGetParameteriv ...................... FULLY implemented
139
140 * Matrix Manipulation:
141
142 vgLoadIdentity ........................ FULLY implemented
143 vgLoadMatrix .......................... FULLY implemented
144 vgGetMatrix ........................... FULLY implemented
145 vgMultMatrix .......................... FULLY implemented
146 vgTranslate ........................... FULLY implemented
147 vgScale ............................... FULLY implemented
148 vgShear ............................... FULLY implemented
149 vgRotate .............................. FULLY implemented
150
151 * Masking and Clearing:
152
153 vgMask ................................ NOT implemented
154 vgClear ............................... FULLY implemented
155
156 * Paths:
157
158 vgCreatePath .......................... FULLY implemented
159 vgClearPath ........................... FULLY implemented
160 vgDestroyPath ......................... FULLY implemented
161 vgRemovePathCapabilities .............. FULLY implemented
162 vgGetPathCapabilities ................. FULLY implemented
163 vgAppendPath .......................... FULLY implemented
164 vgAppendPathData ...................... FULLY implemented
165 vgModifyPathCoords .................... FULLY implemented
166 vgTransformPath ....................... FULLY implemented
167 vgInterpolatePath ..................... FULLY implemented
168 vgPathLength .......................... NOT implemented
169 vgPointAlongPath ...................... NOT implemented
170 vgPathBounds .......................... FULLY implemented
171 vgPathTransformedBounds ............... FULLY implemented
172 vgDrawPath ............................ PARTIALLY implemented
173
174 * Paint:
175
176 vgCreatePaint ......................... FULLY implemented
177 vgDestroyPaint ........................ FULLY implemented
178 vgSetPaint ............................ FULLY implemented
179 vgGetPaint ............................ FULLY implemented
180 vgSetColor ............................ FULLY implemented
181 vgGetColor ............................ FULLY implemented
182 vgPaintPattern ........................ FULLY implemented
183
184 * Images:
185
186 vgCreateImage ......................... PARTIALLY implemented
187 vgDestroyImage ........................ FULLY implemented
188 vgClearImage .......................... FULLY implemented
189 vgImageSubData ........................ PARTIALLY implemented
190 vgGetImageSubData ..................... PARTIALLY implemented
191 vgChildImage .......................... NOT implemented
192 vgGetParent ........................... NOT implemented
193 vgCopyImage ........................... FULLY implemented
194 vgDrawImage ........................... PARTIALLY implemented
195 vgSetPixels ........................... FULLY implemented
196 vgWritePixels ......................... FULLY implemented
197 vgGetPixels ........................... FULLY implemented
198 vgReadPixels .......................... FULLY implemented
199 vgCopyPixels .......................... FULLY implemented
200
201 * Image Filters:
202
203 vgColorMatrix ......................... NOT implemented
204 vgConvolve ............................ NOT implemented
205 vgSeparableConvolve ................... NOT implemented
206 vgGaussianBlur ........................ NOT implemented
207 vgLookup .............................. NOT implemented
208 vgLookupSingle ........................ NOT implemented
209
210 * Hardware Queries:
211
212 vgHardwareQuery ....................... NOT implemented
213
214 * Renderer and Extension Information:
215
216 vgGetString ........................... FULLY implemented
217
218 * VGU
219
220 vguLine ............................... FULLY implemented
221 vguPolygon ............................ FULLY implemented
222 vguRect ............................... FULLY implemented
223 vguRoundRect .......................... FULLY implemented
224 vguEllipse ............................ FULLY implemented
225 vguArc ................................ FULLY implemented
226 vguComputeWarpQuadToSquare ............ NOT implemented
227 vguComputeWarpSquareToQuad ............ NOT implemented
228 vguComputeWarpQuadToQuad .............. NOT implemented
229
230
231 IV. EXTENSIONS
232 =============================
233
234 There are three extensions to the API that manipulate the OpenVG
235 context as a temporary replacement for EGL:
236
237 VGboolean vgCreateContextSH(VGint width, VGint height)
238
239   Creates an OpenVG context on top of an existing OpenGL context
240   that should have been manually initialized by the user of the
241   library. Width and height specify the size of the rendering
242   surface. No multi-threading support has been implemented yet.
243   The context is created once per process.
244
245 void vgResizeSurfaceSH(VGint width, VGint height)
246
247   Should be called whenever the size of the surface changes (e.g.
248   the owner window of the OpenGL context is resized).
249
250 void vgDestroyContextSH()
251
252   Destroys the OpenVG context associated with the calling process.