Author Archives: phill

Update: Getting Started with OpenSL on Android

A while ago I made a post about the use of OpenSL on Android. That post has an error, outlined below: While the OpenSL documentation for the SL_PLAYEVENT_HEADATEND event seems to suggest that the sound has been processed when the … Read the rest of this entry

Filed in Android, code | Comment Now

WebGL Index Validation

If you’ve ever browsed through the WebGL spec, you’ve likely seen section 6: Differences Between WebGL and OpenGL ES 2.0. Right at the top of that section, we find section 6.1: Buffer Object Binding. That section reads as follows: In … Read the rest of this entry

Filed in code, graphics | Comment Now

HenchLua: Representing Values

Values Lua supports the following standard types: Nil Booleans Numbers (doubles) Strings (that is, byte-strings) Tables UserData (arbitrary object references) Functions (both Lua functions and callable user code) Threads (coroutine state) Similarly to .NET types, that list can be split … Read the rest of this entry

Filed in code, HenchLua, Lua | Comment Now

Introducing HenchLua

This is the first of a series of posts on the subject of HenchLua. HenchLua is an implementation of the Lua VM in C#. It’s targeted at projects running in otherwise limited .NET contexts, such as web-based Unity games (the … Read the rest of this entry

Filed in code, HenchLua, Lua | Comment Now

Bicubic Filtering in Fewer Taps

Author’s Note This post is based on the technique described in GPU Gems 2, chapter 20, Fast Third-Order Texture Filtering. While that’s certainly a good read, I found that the authors skipped over a lot of detail and optimized a … Read the rest of this entry

Filed in code, graphics, shaders | 11 Comments

Simple Flip Book Animation in WPF

WPF makes it easy to animate numbers, colors, sizes, and a host of other properties. Unfortunately, it isn’t easy to animate an ImageSource property, which is what we’re usually looking for when implementing a flip book animation. The closest we … Read the rest of this entry

Filed in code, Windows, WPF | Comment Now

Using Win32 Icons in WPF

Using custom icons can be a little tricky in WPF. It’s simple enough if you want to use your application’s main icon or an icon file that you can refer to using a pack URI – so long as you … Read the rest of this entry

Filed in code, Windows, WPF | Comment Now

Extracting Icons from PE Files

There are times when you need an icon file, but all you have is an icon resource embedded in a PE (executable) file. Getting at these is a little tricky, since icon files aren’t stored as a simple blob in … Read the rest of this entry

Filed in code, Windows | Comment Now

Working With Win32 Resources in .NET

Most native applications make extensive use of Win32 resources. While the .NET Framework provides a far more useful resource API, it’s sometimes necessary to access the old style Win32 resources. Fortunately, this isn’t very difficult. The Win32 Resource API The … Read the rest of this entry

Filed in code, Windows | Comment Now

Windowed Fullscreen

Windowed (fake) fullscreen is probably my favorite graphics option ever when it comes to PC games. It lets me have my nice fullscreen game, but doesn’t lock me out of using my other monitor, and any programs running behind the … Read the rest of this entry

Filed in code, graphics, Windows | Comment Now