Post Archive - January 0001 wharbargle
Posts tagged programming
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: ... Read more
HenchLua: Representing Values
Lua supports the following standard types: ... Read more
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 Unity plugin, I believe, requires pure verifiable CIL), mobile apps (which are memory-limited and must meet the limitations of Mono's full AOT compiler, or apps that run on the .NET Compact Framework (whose garbage collector has some serious performance issues, as anyone who's written an XNA game targeted at the Xbox can attest). ... Read more
Bicubic Filtering in Fewer Taps
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 little prematurely, making the result rather difficult to parse. If you've read and understood their paper, then this isn't going to be news to you. ... Read more
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 get out of the box is ObjectAnimationUsingKeyFrames, which works, but it's very tedious to set up all of the individual key frame times. ... Read more
Using Win32 Icons in WPF
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 the PE file. In fact, they're split up into a number of different entries. Fortunately, it isn't very hard to combine these entries into an ICO-format data blob which you can then save to file or pass to an API that expects it. ... Read more
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. ... Read more
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 happen after closing and reopening the project, and it only ever seemed to afflict the executables in my solution - never the libraries. ... Read more