Two of my favourite graphics libraries have been merged together. The Vector Polygon Rasteriser (VPR), a very fast polygon scanline converter, has been merged into Graphics32, the software rendering library I used for the display rendering in the Woodland Calculator project.
The old polygon rendering code has been completely replaced and the results are very interesting. The rendering performance is slightly reduced compared with the original fixed point base code, but it is faster than the old floating point, high quality code; whilst managing to produce equally impressive results. In fact, it can perform some tasks, such as rendering thick outlines, much more easily than in the prior version.
If you would like to see the difference for yourself, you can download the new WoodlandCalc.exe from SourceForge and compare it with the previous one also on SourceForge.
It turns out that it takes longer to write this post, than it does to add the PHP to list the recent WordPress posts, thanks to a few simple function calls wrapped in a loop to fetch the posts:
<?php require('./blog/wp-blog-header.php'); ?>
<?php query_posts('showposts=8'); ?>
<?php while (have_posts()): the_post(); ?>
<span><?php the_date('j/n'); ?></span>
<a href="<?php the_permalink(); ?>">
<?php endwhile; ?>
This is a vanilla WordPress loop construct with a few tweaks to suit my use here. The ‘showposts=8’ parameter limits the number of posts to be listed to 8 and the more cryptic ‘j/n’ parameter for query_posts, formats the date as day/month without leading zeros.
It is nearly a month of evenings and weekends later. As predicted, the real effort was in integrating and synchronising my static HTML pages with the WordPress PHP content. However, to be fair, it wasn’t all one way. I have changed some of the original website to match the TwentyEleven theme used by the blog as I preferred some of its styling over my original design!
I have to say, I like the clean use WordPress makes of cascading style sheets, which enabled a lot of cosmetic customisation without having to edit the PHP code directly. My last task is to replace the old news links on the index page with dynamic content from this blog. Hopefully there is a tidy way to do this!