Coder Social home page Coder Social logo

shivavg's Introduction

ShivaVG
=============================

See AUTHORS for the list of contributors

ShivaVG is an open-source LGPL ANSI C implementation of the Khronos
Group OpenVG specification.

I.    BUILD
II.   TESTING
III.  IMPLEMENTATION STATUS
IV.   EXTENSIONS


I. BUILD
=============================

 * Prerequisites:

   OpenGL development libraries and headers should be installed.
   Othe than that, since it's ANSI C should compile with any modern
   C compiler. jpeglib needs to be installed for example programs
   that use images.

 * Compiling under UNIX systems:

   Read the INSTALL file for more detailed (though generic) directions.
   This library uses the standard ./configure ; make. The example
   programs are automatically compiled. However, compilation of each
   example program can be toggled by ./configure --with-example-xxx
   command where xxx denotes the name of the example. Run ./configure
   --help for a list of such options.

 * Compiling on Mac:

   No XCode project files provided yet. The easiest way is by just
   using gcc, in which case look under UNIX compiling section.

 * Compiling natively on Windows platform:

   Solution files are provided for Visual C++ version 7 and 8. For
   the example programs using images to compile, you will need the
   appropriate build of jpeglib to match your Visual C++ version.

 * Compiling in mingw / cygwin environment:

   Might work just as fine as any UNIX-flavored system, but hasn't
   been tested yet.


II. TESTING
=============================

There is no real testing suite yet. The example programs are there
just to play with what the implementation can currently do, but
can hardly provide any proper validation, since no reference images
are provided. Here is a description of each example program and
what features it highlights:

* test_vgu

  Constructs some path primitives using the VGU API.

* test_tiger

  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.

* test_dash

  Shows different stroke dashing modes.

* test_linear

  A rectangle drawn using 3-color linear gradient fill paint

* test_radial

  A rectangle drawn using 3-color radial gradient fill paint

* test_interpolate

  Interpolates between two paths - an apple and a pear.

* test_image

	Images are drawn using VG_DRAW_IMAGE_MULTIPLY image mode to be
  multiplied with radial gradient fill paint.

* test_pattern

  An image is drawn in multiply mode with an image pattern fill
  paint.


III. IMPLEMENTATION STATUS
=============================

Khronos states in the OpenVG specification, that the contexts for all
their client APIs are expected to be created via the EGL API. Since
EGL to use with ShivaVG has not been implemented yet, there is a set
of extension functions provided for the task of creating, maintaining
and destroying the OpenVG context. (See next section EXTENSIONS for
details.)

What follows is a description of which functions or to what extent
a certain function has been implemented. When a function is marked
as PARTIALLY implemented, the TODO file or the comments in the code
itself would provide further clues.


* General:

vgGetError ............................ FULLY implemented
vgFlush ............................... FULLY implemented
vgFinish .............................. FULLY implemented

* Getters and setters:

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

* Matrix Manipulation:

vgLoadIdentity ........................ FULLY implemented
vgLoadMatrix .......................... FULLY implemented
vgGetMatrix ........................... FULLY implemented
vgMultMatrix .......................... FULLY implemented
vgTranslate ........................... FULLY implemented
vgScale ............................... FULLY implemented
vgShear ............................... FULLY implemented
vgRotate .............................. FULLY implemented

* Masking and Clearing:

vgMask ................................ NOT implemented
vgClear ............................... FULLY implemented

* Paths:

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

* Paint:

vgCreatePaint ......................... FULLY implemented
vgDestroyPaint ........................ FULLY implemented
vgSetPaint ............................ FULLY implemented
vgGetPaint ............................ FULLY implemented
vgSetColor ............................ FULLY implemented
vgGetColor ............................ FULLY implemented
vgPaintPattern ........................ FULLY implemented

* Images:

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 ........................... FULLY implemented
vgWritePixels ......................... FULLY implemented
vgGetPixels ........................... FULLY implemented
vgReadPixels .......................... FULLY implemented
vgCopyPixels .......................... FULLY implemented

* Image Filters:

vgColorMatrix ......................... NOT implemented
vgConvolve ............................ NOT implemented
vgSeparableConvolve ................... NOT implemented
vgGaussianBlur ........................ NOT implemented
vgLookup .............................. NOT implemented
vgLookupSingle ........................ NOT implemented

* Hardware Queries:

vgHardwareQuery ....................... NOT implemented

* Renderer and Extension Information:

vgGetString ........................... FULLY implemented

* VGU

vguLine ............................... FULLY implemented
vguPolygon ............................ FULLY implemented
vguRect ............................... FULLY implemented
vguRoundRect .......................... FULLY implemented
vguEllipse ............................ FULLY implemented
vguArc ................................ FULLY implemented
vguComputeWarpQuadToSquare ............ NOT implemented
vguComputeWarpSquareToQuad ............ NOT implemented
vguComputeWarpQuadToQuad .............. NOT implemented


IV. EXTENSIONS
=============================

There are three extensions to the API that manipulate the OpenVG
context as a temporary replacement for EGL:

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.

shivavg's People

Contributors

ileben avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

shivavg's Issues

Closing line doesn't work properly

An example application understands where a final point is placed but the lines are drawn with wrong linejoin style.
Simply take your "testDash" example and replace the points of star with points of simply rect. You will see that 3 corners of a figure have the same style and the last one has a different style

No longer maintained ?

I forked from your project for some reasons :

https://github.com/tqm-dev/ShivaVG-2

that supports Shader-Based OpenGL and
having API extensions for GLSL shader integrated to vector/image rendering.

Your project seems that no longer actively maintained now since 2010.
Do you think my implementation is possible to be next version of ShivaVG in official ?

vgGetPaint not actually implemented

Readme says "FULLY implemented", and the function definition is in openvg.h, but not actually implemented. Looks like it should be in src/shPaint.c, but it's not present in any of the files.

Undefined GLEXT symbols when compiling

Problem:

on recent Arch linux, this isn't compiling as-is. Basically problem finding the symbol definition of GLintptr (error: unknown type name 'GLintptr'). Googling this found a similar problem filed on libreoffice. That ticket pointed to GL_GLEXT_LEGACY being defined, having an effect on all this. And in this project, in src/sdDefs.h it is defined for non-windows, non-apple platforms.

Steps to reproduce:

sh autogen.sh
./configure
make

Platform info (I don't know what's relevant):

GLX version: 1.4
GL_GLEXT_VERSION (found in /usr/include/glext.h): 20140810
OpenGL version string: 4.4.0 NVIDIA 343.22
Kernel: 3.17.1

Full error:

make  all-recursive
make[1]: Entering directory '/home/dan/tmp/ShivaVG'
Making all in src
make[2]: Entering directory '/home/dan/tmp/ShivaVG/src'
/bin/sh ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..    -ansi -pedantic -I../include/vg -INONE/include -MT libOpenVG_la-shExtensions.lo -MD -MP -MF .deps/libOpenVG_la-shExtensions.Tpo -c -o libOpenVG_la-shExtensions.lo `test -f 'shExtensions.c' || echo './'`shExtensions.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -ansi -pedantic -I../include/vg -INONE/include -MT libOpenVG_la-shExtensions.lo -MD -MP -MF .deps/libOpenVG_la-shExtensions.Tpo -c shExtensions.c  -fPIC -DPIC -o .libs/libOpenVG_la-shExtensions.o
In file included from /usr/include/GL/glx.h:333:0,
                 from shDefs.h:170,
                 from shExtensions.c:23:
/usr/include/GL/glxext.h:480:143: error: unknown type name 'GLintptr'
 typedef void ( *PFNGLXCOPYBUFFERSUBDATANVPROC) (Display *dpy, GLXContext readCtx, GLXContext writeCtx, GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
                                                                                                                                               ^
/usr/include/GL/glxext.h:480:164: error: unknown type name 'GLintptr'
 typedef void ( *PFNGLXCOPYBUFFERSUBDATANVPROC) (Display *dpy, GLXContext readCtx, GLXContext writeCtx, GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
                                                                                                                                                                    ^
/usr/include/GL/glxext.h:480:186: error: unknown type name 'GLsizeiptr'
 typedef void ( *PFNGLXCOPYBUFFERSUBDATANVPROC) (Display *dpy, GLXContext readCtx, GLXContext writeCtx, GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
                                                                                                                                                                                          ^
/usr/include/GL/glxext.h:481:148: error: unknown type name 'GLintptr'
 typedef void ( *PFNGLXNAMEDCOPYBUFFERSUBDATANVPROC) (Display *dpy, GLXContext readCtx, GLXContext writeCtx, GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
                                                                                                                                                    ^
/usr/include/GL/glxext.h:481:169: error: unknown type name 'GLintptr'
 typedef void ( *PFNGLXNAMEDCOPYBUFFERSUBDATANVPROC) (Display *dpy, GLXContext readCtx, GLXContext writeCtx, GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
                                                                                                                                                                         ^
/usr/include/GL/glxext.h:481:191: error: unknown type name 'GLsizeiptr'
 typedef void ( *PFNGLXNAMEDCOPYBUFFERSUBDATANVPROC) (Display *dpy, GLXContext readCtx, GLXContext writeCtx, GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
                                                                                                                                                                                               ^
Makefile:459: recipe for target 'libOpenVG_la-shExtensions.lo' failed
make[2]: *** [libOpenVG_la-shExtensions.lo] Error 1
make[2]: Leaving directory '/home/dan/tmp/ShivaVG/src'
Makefile:393: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/dan/tmp/ShivaVG'
Makefile:324: recipe for target 'all' failed
make: *** [all] Error 2

Fix (for me at least, not sure if this is a total fix)

diff --git a/src/shDefs.h b/src/shDefs.h
index 502ee30..dea34bf 100644
--- a/src/shDefs.h
+++ b/src/shDefs.h
@@ -166,6 +166,7 @@ SHfloat getMaxFloat();
 #else
 #  define GL_GLEXT_LEGACY /* don't include glext.h */
 #  include <GL/gl.h>
+#  include <GL/glext.h>
 #  include <GL/glu.h>
 #  include <GL/glx.h>
 #endif

I'd issue a PR with this, but the comment above it literally says not to do this. So I'm not sure if this should be the permanent fix.

running examples on Ubuntu 13.04 => undefined symbol: gluOrtho2D

Hi,
I built and installed without problem shivaVG on my Ubuntu 13.04, but I get the following messages when I try running any of the provided examples:
/home/flo/svn/shivavg2/trunk/examples/.libs/lt-test_blend: symbol lookup error: /home/flo/svn/shivavg2/trunk/src/.libs/libOpenVG.so.0: undefined symbol: gluOrtho2D

Any clue?

Thanks,
Flo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.