Direct3D+11+Tutorials

//by Richard Russell, August 2015//


 * Note that the code in these tutorials requires Windows 8.1 or Windows 10**

This set of tutorials is very closely based on **Microsoft's Direct3D 11 [|tutorials]** but with the code translated from C++ to //BBC BASIC for Windows//. To make sense of the tutorials you will need to refer to the originals, because they go into much greater detail.

The tutorials are designed to teach a programmer the basics of the Direct3D 11 API. They cover basic setup and procedures to accomplish the fundamental tasks, such as rendering and transformations. The intended audience is those familiar with programming, but relatively new to 3D graphics programming.


 * [|Tutorial 1 - Direct3D 11 Basics]
 * Tutorial 2 - Rendering a Triangle
 * Tutorial 3 - Shaders and Effect System
 * Tutorial 4 - 3D Spaces
 * Tutorial 5 - 3D Transformation
 * Tutorial 6 - Lighting
 * Tutorial 7 - Texture Mapping and Constant Buffers

You can **download** all the source files, shader files, libraries etc. required to run the sample code as [|D3D11tutorial.zip]. You will need the full version of //BBC BASIC for Windows// (v6.00a or later) and Windows 8.1 or Windows 10.

Direct3D 11 **is** complex, but please don't be intimidated by the code in the tutorials. It is not necessary to understand it in detail, and practical 3D applications can be created using largely a copy-and-paste approach. It will often be unnecessary to program in High Level Shader Language (HLSL) because the FX files supplied with the tutorials will be sufficient.

For those who are more ambitious, the HLSL compiler procedure contained in D3D11LIB.BBC is designed to report errors and warnings to aid fault finding (note that if you run the Tutorial 6 sample code you will receive warnings of this kind, which may be ignored).

The original Microsoft tutorials on which these are based rely on the presence of a DLL (D3DX11) which is neither guaranteed to be installed nor can be legally distributed. In particular, D3DX routines are used to perform mathematical operations, HLSL compilation and texture loading. Therefore those specific features have been recoded in D3D11LIB.BBC in order to guarantee that the code in the tutorials, and applications based it, will run on any Windows 8.1 (or later) PC so long as it has DirectX 11 compliant graphics hardware and drivers.