These are some of the tutorial projects I have been working on for DX11. Most of them are pretty much ready to go source code wise, but the goal is to do YouTube videos explaining the code.

Foundational DX Code

This first project is code that you can use for pretty much every DX project you work on from now on although you may want to expand on it a bit. This is the basic code needed to make DX work. It is so basic in fact that it does not do anything except put a blank window on the screen.

This zip file contains the full solution which is two projects. The second project in the solution has a "SceneObject" class that allows you to create some objects to see. However, the vertex buffer for these objects must be created by hand, which is very tedious.

Essential DX


This second project is a continuation of the first project. The first project allowed for simple SceneObjects that were colored by their vertex colors. This project introduces texturing to take things to the next level.



The SkyBox is a basic technique used is many 3D games to create the illusion of a sky. This third project continues to build on the previous projects and creates a very rudimentary SkyBox to add a sky to the scene.


Probably Shouldn't Have

The previous projects are ones that I've spent a great deal of time on trying to make sure they are well commented/documented. This final (for the moment) project is fresh off the presses. I just got it working a couple of hours ago. It's raw dirty code that hasn't been properly documented, so cut me a little slack. In fact, I'm not sure I intend to even publish it long term. It's more of a prototype of some things I'm working towards.

However, I would like to make it available to you if you are interested because it goes quite a bit further than the other tutorial projects.

This project introduces Blender objects. It includes a Python script to export Blender models to a custom format. Then it takes this Blender export file and reads it in to put a 3D Blender model, including textures, into the scene from the previous examples.

I may actually pull this later. I have not cleaned this project up and there are several things kind of sloppy about it including that it is not documented/commented at all as far as the code that goes beyond the previous projects. Also, you will notice it takes a long time for it to start up. The model files are about as far from optimized as you can get. If you had to load 1,000 models this way, it would take a month. This is the first step in creating a model compiler that will produce optimized model files that will load quickly. But first we have to load the Blender export files and view them to see that they are correct and prove that we can load their data.

Next, I will add export code to serialize the RigidModel class. Then I'll add code to read in the serialized data and then do a completely seperate project that reads in the serialized/optimized files instead of these ugly Blender files. That's what we want long term.

All of this is set up for rigid animation. I may do a tutorial on that soon, because all this code is setup for it; doing rigid animation is very simple with everything that is set up here. I just didn't introduce it with this code. There is some extremely simple animation in all these examples that you can experiment with, but rigid animation is the next step and this code is already ready to support it.

Blender Models

Update 5/27/15: I finished the next step which was to basically serialize the RigidModel class. Also more importantly, it turns out there was a major bug in the Blender Models code I posted where it would not compile in a 32 bit version. I corrected that issue and it's compiling in 32 bit again. I also built a C# program to read the serialized RigidModel file. It's a binary file and so having a file reader to examine the contents of the file was something I thought that would be helpful. Plus, I wanted to make sure I knew how to read it in before I go to the next step of completely redesigning this to make a more permenant RigidModel class that will read in the serialized .RMF file directly. I want to seperate compiling the Python export file to a completely seperate compiler program which will probably be the second thing I work on after I rebuild the whole framework to read in .RMF files.

Blender Models with Serialized Class





I am posting the source code for several tutorial programs that I am working on. This is a work in progress. Hopefully I'll get everything here updated soon, but at the moment consider everything "under construction" and prone to change at any moment.


The Holodeck




Future Use