Archive for the ‘C++’ Category
Site Blogged
My homegrown php code is ageing badly, so it’s time to ditch the lot and join the WordPress collective.
Hopefully the site survived the transition:
- The squish library has its own page, but this just links to the Google Code project where this is now hosted.
- All other old articles and code should have been converted into posts.
- Found a thoroughly awesome WordPress redirection plugin, so all the old links should still work. Please post a comment if your incoming link didn’t work.
- I have stopped messing around with the site now, permalink structure is final!
Perhaps now I can post more than one item per year!
Spherical Harmonic Basis Functions
Spherical harmonic basis functions can be defined in various different ways depending on your derivation or normalisation requirements. This page defines the real-valued set I use, along with algorithms and code snippets for irradiance estimation and run-time evaluation.
Read the rest of this entry »
A Lua Syntax Highlighter
Lua is a very compact, fast scripting language with great platform support. Editing lua scripts is nice and easy in most editors (such as gvim), but Visual Studio doesn’t highlight the syntax by default. So here’s a plug-in for Visual Studio .NET 2003 that highlights Lua 5.0 syntax and provides auto-completion for keywords and identifiers as you type.
Read the rest of this entry »
Pooled Allocators For The STL
One of the main complaints about the STL is the perceived lack of memory efficiency. In this article I’ll present a simple pooled allocator for use with the STL containers that allocate single elements at a time, such as list, set or map.
Why You Should Always Use static_cast
I’m writing this to document my experience with the use of casting in large class hieararchies, specifically those that use multiple inheritance. I’ll be mainly having a go at anyone who likes to use C-style casts to move around their class hierarchy.
Read the rest of this entry »
Why You Should Always Use explicit Constructors
Part of the overloading rules in C++ allow for types to be freely converted to other types through the use of single-argument constructors. Since no compilers currently inform you when this is going on it can lead to obscure bugs and/or inefficient code.
Read the rest of this entry »
How To Fix The DirectX Rasterisation Rules
DirectX has always rasterised to render target pixel centres, and has always looked up textures from texel edges. Because of this, it is more difficult than it should be to write a flexible shader system where various portions of your pipeline are image-based. It is much simpler to work in a unified system where you write to render target pixel edges, and this article details a simple way of fixing this.
Read the rest of this entry »
Really Old Demos – The Buggy Demo
This demo is just here for posterity – it formed part of my August 2002 coding portfolio when I was first applying for jobs in the games industry. Be warned, there’s some seriously dodgy coding going on here…
Read the rest of this entry »
Really Old Demos – Cubic Shadow Mapping
This demo is just here for posterity – it formed part of my August 2002 coding portfolio when I was first applying for jobs in the games industry. Be warned, there’s some seriously dodgy coding going on here…
Really Old Demos – OpenEngine
This demo is just here for posterity – it formed part of my August 2002 coding portfolio when I was first applying for jobs in the games industry. Be warned, there’s some seriously dodgy coding going on here…