Search

### Calculating square root using Newton’s iterative method

I suddenly had a desire to calculate square roots. It’s been one of those things that just sits at the back of my mind lingering.

### Antialiasing with a signed distance field

When drawing basic primitives we want nice smooth edges. This means both pixel correctness and antialiasing. In my previous article about drawing a rectangle I

### Get rid of those boolean function parameters

I need to make a quick variation of a function. The calculation, or behaviour, differs slightly on the needs of the caller. I throw in

### Combining several GL draw calls into one: a rounded rectangle

My previous article explains how I draw a rounded rectangle using a shader instead of tesselation. The biggest remaining issue is using eight calls to

### Debugging by binary searching through code revisions

What do you do when all normal debugging means fail? You can reproduce a bug, but the debugger just doesn’t seem to pinpoint it. Print

### A swipingly good time with edge gestures

I’ve been working a lot lately on gestures and am currently working on a swipe-in panel class. Mostly we take these controls and behaviours for

### Measuring finger / mouse velocity at release time

Any interface involving touch will inevitably need to know how fast the user is moving their finger. They touch the screen, drag their finger, release

### Bringing blurry device independent pixels into focus

Device independent pixels, or points, are a convenient way to design for multiple devices. They allow a consistent layout without worrying about exact pixel densities.

### Quelling the floating point demon in my line rendering code

A floating point demon had attacked my rendering code. Instead of drawing a nice straight line I’d get a devil’s tail flurried with barbs. It

### Cubist artwork with the help of a GPU

I wanted to come up with a shattered glass effect for my game. That didn’t quite work as intended, but I was nonetheless happy with