Note: This project is based on https://github.com/tqm-dev/ShivaVG-2
- Working on Shader-Based OpenGL
- API extensions for GLSL shader integrated to vector/image rendering
- OpenGL development libraries and headers should be installed.
- freeglut must be installed for rendering on window system.
- jpeglib needs to be installed for example programs that use images.
Clone and enter the repository:
$ git clone https://github.com/tqm-dev/ShaderVG
$ cd ShaderVG
Under UNIX systems, execute configure and make:
$ sh autogen.sh
$ ./configure LIBS="-lGL -lglut -ljpeg"
$ make
Move to examples directory, execute tests:
$ cd examples
$ ./test_tiger_shader
Well known svg tiger meets GLSL vertex/fragment shading.
Constructs some path primitives using the VGU API.
The most simple performance test. It draws the well known svg tiger using just simple stroke and fill of solid colors. It consists of 240 paths.
Shows different stroke dashing modes.
A rectangle drawn using 3-color linear gradient fill paint
A rectangle drawn using 3-color radial gradient fill paint
Interpolates between two paths - an apple and a pear.
Images are drawn using VG_DRAW_IMAGE_MULTIPLY image mode to be multiplied with radial gradient fill paint.
An image is drawn in multiply mode with an image pattern fill paint.
API | status |
---|---|
vgGetError | FULLY implemented |
vgFlush | FULLY implemented |
vgFinish | FULLY implemented |
API | status |
---|---|
vgSet | FULLY implemented |
vgSeti | FULLY implemented |
vgSetfv | FULLY implemented |
vgSetiv | FULLY implemented |
vgGetf | FULLY implemented |
vgGeti | FULLY implemented |
vgGetVectorSize | FULLY implemented |
vgGetfv | FULLY implemented |
vgGetiv | FULLY implemented |
vgSetParameterf | FULLY implemented |
vgSetParameteri | FULLY implemented |
vgSetParameterfv | FULLY implemented |
vgSetParameteriv | FULLY implemented |
vgGetParameterf | FULLY implemented |
vgGetParameteri | FULLY implemented |
vgGetParameterVectorSize | FULLY implemented |
vgGetParameterfv | FULLY implemented |
vgGetParameteriv | FULLY implemented |
API | status |
---|---|
vgLoadIdentity | FULLY implemented |
vgLoadMatrix | FULLY implemented |
vgGetMatrix | FULLY implemented |
vgMultMatrix | FULLY implemented |
vgTranslate | FULLY implemented |
vgScale | FULLY implemented |
vgShear | FULLY implemented |
vgRotate | FULLY implemented |
API | status |
---|---|
vgMask | NOT implemented |
vgClear | FULLY implemented |
API | status |
---|---|
vgCreatePath | FULLY implemented |
vgClearPath | FULLY implemented |
vgDestroyPath | FULLY implemented |
vgRemovePathCapabilities | FULLY implemented |
vgGetPathCapabilities | FULLY implemented |
vgAppendPath | FULLY implemented |
vgAppendPathData | FULLY implemented |
vgModifyPathCoords | FULLY implemented |
vgTransformPath | FULLY implemented |
vgInterpolatePath | FULLY implemented |
vgPathLength | NOT implemented |
vgPointAlongPath | NOT implemented |
vgPathBounds | FULLY implemented |
vgPathTransformedBounds | FULLY implemented |
vgDrawPath | PARTIALLY implemented |
API | status |
---|---|
vgCreatePaint | FULLY implemented |
vgDestroyPaint | FULLY implemented |
vgSetPaint | FULLY implemented |
vgGetPaint | FULLY implemented |
vgSetColor | FULLY implemented |
vgGetColor | FULLY implemented |
vgPaintPattern | FULLY implemented |
API | status |
---|---|
vgCreateImage | PARTIALLY implemented |
vgDestroyImage | FULLY implemented |
vgClearImage | FULLY implemented |
vgImageSubData | PARTIALLY implemented |
vgGetImageSubData | PARTIALLY implemented |
vgChildImage | NOT implemented |
vgGetParent | NOT implemented |
vgCopyImage | FULLY implemented |
vgDrawImage | PARTIALLY implemented |
vgSetPixels | NOT implemented yet |
vgWritePixels | NOT implemented yet |
vgGetPixels | FULLY implemented |
vgReadPixels | FULLY implemented |
vgCopyPixels | NOT implemented yet |
API | status |
---|---|
vgColorMatrix | NOT implemented |
vgConvolve | NOT implemented |
vgSeparableConvolve | NOT implemented |
vgGaussianBlur | NOT implemented |
vgLookup | NOT implemented |
vgLookupSingle | NOT implemented |
API | status |
---|---|
vgHardwareQuery | NOT implemented |
vgGetString | FULLY implemented |
API | status |
---|---|
vguLine | FULLY implemented |
vguPolygon | FULLY implemented |
vguRect | FULLY implemented |
vguRoundRect | FULLY implemented |
vguEllipse | FULLY implemented |
vguArc | FULLY implemented |
vguComputeWarpQuadToSquare | FULLY implemented |
vguComputeWarpSquareToQuad | FULLY implemented |
vguComputeWarpQuadToQuad | NOT implemented |
-
VGboolean vgCreateContextSH(VGint width, VGint height)
Creates an OpenVG context on top of an existing OpenGL context that should have been manually initialized by the user of the library. Width and height specify the size of the rendering surface. No multi-threading support has been implemented yet. The context is created once per process.
-
void vgResizeSurfaceSH(VGint width, VGint height)
Should be called whenever the size of the surface changes (e.g. the owner window of the OpenGL context is resized).
-
void vgDestroyContextSH()
Destroys the OpenVG context associated with the calling process.
This project is licensed under the GNU Lesser General Public License v2.1 - see the LICENSE file for details