DirectX Part 3: Vertices and Shaders

Let’s get some real 3D going.


Everything in 3D is just a series of triangles, and triangles are just a series of vertices. Vertices must have 3-dimensional positions — it’s the only absolutely required information DirectX 11 needs — but they can have any number of additional traits. Normal vectors, colors (for vertex coloring), lighting information (per-vertex lighting), metadata, etc.… Read the rest

DirectX Part 2.5: The Rendering Pipeline

Okay, so, we’ve got all our DirectX stuff set up to start rendering pretty pictures.

So it’s important, at this time, to talk about the pipeline that does the rendering. Unfortunately, it’s a beast:

That's a ten-step pipeline, yes it is

Some of these can be simplified or ignored for now — but it’s important you understand this stuff. This is the core of rendering.… Read the rest

DirectX Part 2: Displaying, Like, Anything

So you just read the previous tutorial, you initialized Direct3D on your video card, and now you have pointers to these three items — a Swap Chain, a D3D Device, and a D3D Device Context. Well, in this tutorial, we’re going to display a color on screen! And it’s going to require using all three items.… Read the rest

DirectX Part 1: The “Initialize” Function

GUYS. I hate to break it to you, but normal programming on CPUs is for wimps. GPU programming is where you have to go to find fast cars / hot ladies. BUT THERE’S A PROBLEM: it’s hella hard to program for GPUs! Well. Until now, when I explain it all to you.

Since the dawn of computing, every line of code has run on your CPU, by default.… Read the rest

Going Down The List: RAM Stats Spec Sheet

So, we’ve already discussed CPUs, GPUs, and motherboards. But we haven’t discussed RAM! LET’S FIX THAT.

RAM stands for “Random Access Memory”. The name, like many in computer hardware, is antiquated and emphasizes aspects of memory that nobody cares about anymore. Although almost every component in a computer has some amount of random-access memory attached, most people are referring to the “main memory” in computers when they talk about RAM.… Read the rest

Motherboards: Where Are Their Ladyparts??

Continuing in a series of explanations of computer hardware, let’s look at motherboards! How do you tell motherboards apart? If you can hook all your hardware up to two motherboards, which one is better?


The most important thing about the motherboard is that it connects all the individual parts of your computer.… Read the rest

On The History of Programming

We’re starting this post with a Zen Koan. Here it is, from The Gateless Gate, a 13th century Chinese compilation.

A monk asked the master to teach him.
The master asked, “Have you eaten your rice?”
“Yes, I have,” replied the monk.
“Then go wash your bowl”, said the master.
With this, the monk was enlightened.
Read the rest

Video Cards Have So Many Stats!

If you research video cards, because you’re buying one or something, you’re gonna see a TON of stats. And let’s be honest, you won’t understand all of them. This blog post will fix that problem! Maybe. Hopefully.

This is pretty much an info dump of all stats mentioned in NewEgg, AnandTech, and TomsHardware listings. Stats are split up by general category, whether they affect the video card EXIST AS A HUNK OF METAL, or MOVE DATA AROUND, or DO CALCULATIONS.… Read the rest

C++: When should you use copy constructors?


Well, first, let’s do a refresher course.

1. Copy constructors are when you construct a new instance of a class by giving it an already-constructed instance of that class to clone. MyClass otherMyClass = thisMyClass; and MyClass otherMyClass(thisMyClass); are the two ways to call copy constructors. At the end of copy construction, otherMyClass is theoretically the same as thisMyClass.… Read the rest

Conditional Probability: PROBABLY Awesome

Forget computer architecture, I want to talk about statistics.

LET’S SAY that you invent a test that determines whether someone is in the Illuminati, and it’s 99.9% accurate. Now, let’s say 0.1% of the world’s population is actually in the Illuminati. Someone takes the test, and it claims they’re Illuminati. What are the odds they’re really a member of a shadow government?… Read the rest