Copperbox revision 449.
More work on the parser and lexer. I'd forgotten how much work was involved in writing a parser with Happy and Alex - maybe I should have tried Parsec, though I've never used Parsec for a full language (especially when the grammar might have left recursion, which means grammar changes).
Wednesday, February 4, 2009
Tuesday, February 3, 2009
GLSL syntax library
Copperbox revision 448.
Initial work on the lexer and parser for the GLSL syntax library.
Initial work on the lexer and parser for the GLSL syntax library.
Monday, February 2, 2009
GLSL syntax library
Copperbox revision 447.
Started a new syntax library for the OpenGL shading lang. The library should support parsing and pretty printing like Language.C and Language.Haskell.
I did some work on a Frown parser for Language.C a while ago - though I didn't get very far with it. Hopefully as GLSL is a C like language, there might be some opportunity to cannibalize this work.
Started a new syntax library for the OpenGL shading lang. The library should support parsing and pretty printing like Language.C and Language.Haskell.
I did some work on a Frown parser for Language.C a while ago - though I didn't get very far with it. Hopefully as GLSL is a C like language, there might be some opportunity to cannibalize this work.
Haskell OpenVG binding - ready for release
Copperbox revision 446.
Now that the binding builds on Windows and MacOSX - I think its time to see about putting it on Hackage.
Now that the binding builds on Windows and MacOSX - I think its time to see about putting it on Hackage.
OpenVG Windows install instructions
It is tedious to install ShivaVG on Windows with MinGW/Msys
(Idon't think Cygwin will work at all). With GHC-6.10.1 most
people appear to be following these instructions to install
HOpenGL and HGLUT - they are the ones I followed:
http://netsuperbrain.com/blog/posts/freeglut-windows-hopengl-hglut/
To get Shiva-VG to work under MinGW/Msys you have to do the same
trick of compiling directly with gcc rather than using the makefiles
as per *Compile and Install freeglut*.
Here's what I did:
I dropped the archive into my home directory
C:\msys\1.0\home\stephen
> tar xvfz shivavg-0.2.0.tar.gz
> cd shivavg-0.2.0/src
> gcc -O2 -c *.c -I../include/VG
That should build the *.o files.
> gcc -shared -o openvg32.dll *.o -Wl,--enable-stdcall-fixup,--out-implib,libopenvg32.a -lopengl32 -lglu32 -lgdi32 -lwinmm
That should create `openvg32.dll` and `libopenvg32.a`.
Put `libshivavg32.a` into your MinGW lib directory, on my system
it is here:
C:\MinGW\lib
Also copy the `vg` folder from `shivavg-0.2.0\include` to the
MinGW include directory, on my system it is here:
C:\MinGW\include
You should have folders for both the GL and OpenVG headers:
C:\MinGW\include\GL
C:\MinGW\include\vg
Now you should be able to build the Haskell binding to Shiva:
I dropped the archive into my home directory
C:\msys\1.0\home\stephen
> tar xvfz OpenVG-0.1.tar.gz
> cd OpenVG-0.1
> runhaskell Setup.hs configure
> runhaskell Setup.hs build
> runhaskell Setup.hs install
> runhaskell Setup.hs haddock
To run the test you need to copy `openvg32.dll` from
the shivavg src directory into OpenVG-0.1/examples.
The cd to examples and run with:
> runhaskell -lopenvg TestVgu.hs
This should display a white window with some line drawn
shapes.
Better examples of OpenVG capabilities are in the ShivaVG
examples. Particularly test_tiger which uses the famous
tiger from SVG tutorials.
Running ShivaVG's C examples
----------------------------
ShivaVG itself seems to have some problems with FreeGlut -
at least if the are both compiled through the direct gcc
(no makefile) hack as per the *netsuperbrain.com* blog tutorial.
Compiling should be straight-forward, the following command
compiles test_tiger.exe:
> gcc -o test_tiger test.c test_tiger_paths.c test_tiger.c -lm -lglut32 -lglu32 -lopengl32 -lopenvg32
To run the test_tiger.exe you will need to drop to put a copy of
the `openvg32.dll` that you compiled (in the src directory) into
the examples directory.
You will also need a copy of `glut32.dll` in the examples
directory - and here seems to be the snag.
I don't think the `glut32.dll` produced by FreeGlut works
- at least not if its compiled as per the *netsuperbrain.com*
guide. The `glut32.dll` compiled from FreeGlut is identifiable
as its 308KB in size (on my computer at least). If you try to
run test_tiger.exe with this it may fail with an
`Entry Point Not Found` dialog for the function
`_glutCreateMenuWithExit` (it certainly fails for me).
To get around this, I have to use the `glut32.dll` from my
Cygwin installation, this is 232KB in size and was in the folder:
C:\cygwin\bin
I copied this into the `examples` folder along with `openvg32.dll`
then double-clicking on test_tiger.exe should work.
Sunday, February 1, 2009
Haskell OpenVG binding
Copperbox revision 445.
The OpenVG binding now builds under cabal on Windows.
I've included a sdist package in the toplevel directory dist:
svn checkout http://copperbox.googlecode.com/svn/trunk/dist/
Although once I've checked it on MacOSX I'll see about getting it put on Hackage.
The OpenVG binding now builds under cabal on Windows.
I've included a sdist package in the toplevel directory dist:
svn checkout http://copperbox.googlecode.com/svn/trunk/dist/
Although once I've checked it on MacOSX I'll see about getting it put on Hackage.
Haskell OpenVG binding
Copperbox revision 444.
Some work on the cabal file. On Windows, it seems I can build and install with a Simple build provided I use MinGW and not Cygwin, but then the library has some problems with symbol names.
I should be getting a Linux machine set up over the next week, so I'd expect developing the cabal file on that will be easier.
Some work on the cabal file. On Windows, it seems I can build and install with a Simple build provided I use MinGW and not Cygwin, but then the library has some problems with symbol names.
I should be getting a Linux machine set up over the next week, so I'd expect developing the cabal file on that will be easier.
Subscribe to:
Posts (Atom)
Blog Archive
About Me
- Stephen Tetley
- Disambiguating biog as there are a few Stephen Tetley's in the world. I'm neither a cage fighter or yachtsman. I studied Fine Art in the nineties (foundation Bradford 1992, degree Cheltenham 1992 - 95) then Computing part-time at Leeds Met graduating in 2003. I'm the Stephen Tetley on Haskell Cafe and Stackoverflow.