Wednesday, December 22, 2010

Direct3D is complicated

Direct3D is complicated. It is low level. It doesn't understand spheres, cubes, rooms or landscapes. All it really knows about are points, lines and triangles. You want a sphere? Better learn how to make one out of triangles! D3D9 used to have the D3DXCreate functions to create spheres, cylinders etc but these seem to have been removed in D3D10.

The learning curve is steep. Before you can even get a simple triangle on screen you must learn about effect files, techniques, vertex buffers, vertex descriptors, vertex shaders, pixel shaders and the "graphics pipeline" in general. If you want to move stuff you need to know about coordinate spaces, transforms and matrices. If you want to light stuff up with something resembling real light you'll need to create your own lighting equations in a shader. There is no predefined lighting like there was in the old "fixed function pipeline" in previous versions of D3D. Fortunately many of these equations are well known and there are shader creation tools to help generate more complex effects.

So. Where do we start? With a good book and the tutorials on MSDN of course!

Monday, December 20, 2010

Introduction

This is a place to share my adventures in Direct3D programming. I'm an amateur, in the best sense of the word. I don't program for a living. However I have an (unhealthy?) interest in C++ and have dabbled in 3D for a few years. I guess I just like seeing fancy graphics on my PC!