Category Archives: code

Visual C#: Phantom Breakpoints

So I’ve got a large solution with a lot of projects (mostly build tools) and every now and then I would get suspicious phantom breakpoints, meaning that the debugger would break where no breakpoint had been placed. This would usually … Read the rest of this entry

Filed in code | Comment Now

Getting Started with OpenSL on Android

Edit: This article, as originally posted, has an error in it, which has been corrected. Anyone who just wants to see the fix can check out this update. So, you want to play some audio on an Android device. You’ve … Read the rest of this entry

Filed in Android, code | 8 Comments

Abstracting Low-Level I/O

One of the common requirements in game development is that we need to load large blocks of (usually) compressed data in as little time as possible. This, however, is somewhat easier said than done. Ideally, what we’re looking for is … Read the rest of this entry

Filed in code | Comment Now

Simple Digital Signatures

One of the things that comes up when sending data over the internet is verifying that it hasn’t been corrupted. This is generally a simple thing to resolve: send the data and a good hash (MD5 or SHA-1) of the … Read the rest of this entry

Filed in code, security | Comment Now

Using Win32 Asynchronous I/O

Recently wrote some asynchronous I/O code for a fast data loader. The data file was logically a stream of separate objects, so it made sense to parse it a chunk at a time. That’s a situation which practically screams for … Read the rest of this entry

Filed in code | 2 Comments

WPF: Subtle Binding Crash

Got a crash in, of all things, System.Windows.Controls.Primitives.Popup.OnWindowResize(Object sender, AutoResizedEventArgs e). A NullReferenceException, to be precise. Ages later, it turns out that this error was actually caused by a binding operation on one of the controls in the popup failing … Read the rest of this entry

Filed in code, WPF | Comment Now

How to Make boost::function-like Templates

If you’ve dealt with Boost at all, you’ve certainly seen this at some point: boost::function< int( int, float, const char* ) > func = … ; int x = func( 4, 3.0F, "" ); So how is that done? How … Read the rest of this entry

Filed in code | Comment Now

MSBuild and Visual Studio’s Hosting of It

This is an interesting issue that might have bitten you if you’ve been trying to get code generators to play nicely in C# projects. You get your generator. You get your project. You open up the project and add an … Read the rest of this entry

Filed in build, code | Comment Now

cgConnectParameter Considered Harmful

Hooking up a large number of shared effect parameters to a single head parameter via cgConnectParameter is, apparently, not the intended use case. Doing so causes any cgSetParameter call on the head parameter to become orders of magnitude slower (though … Read the rest of this entry

Filed in code, shaders | Comment Now