directx / direct3d tutorials

straight-up direct3d

  1. basics
    • before we start
    • download and install the directx sdk
    • building your build environment
    • direct3d immediate mode and retained mode
  2. initialize direct3d
    • create a direct3d project
    • create a window
    • create a direct3d device
    • add our rendering routine
    • source file
  3. draw a triangle
    • define your vertex structure
    • create a vertex buffer
    • load the vertex buffer
    • draw the vertex buffer
    • source file

robert's direct3d framework

RGL serves as a tutorial for how a Direct3D framework might work. Feel free to use it in your own project, as long as I get a free copy of the program when you're done!

robert's new object oriented direct3d framework

NGF serves as a tutorial for how a OO Direct3D framework should work. Like RGL, feel free to use it in your own project as long as I get a free copy when you're done! This public release is fairly limited, about the only thing it offers past the fact that it's OO is it supports textures. Download it here. Here's the class breakdown:

  • NGFBase: Base class for scene drawing. You should extend this class along with the methods Init(), DrawScene(), InvalidateObjects() and RestoreObjects() to draw your own scene.
  • NGFD3DLayer: This singleton class is the primary interface class for accessing Direct3D.
  • NGFD3DTMU: This class is owned and managed by NGFD3DLayer and is the texture management unit for the framework.
  • Bones: This is an example class that extends from NGFBase that is included in the source code above. All it does is draw two rotating polygons.
  • ngf: This is the MFC base class that declares a Bones class and sends messages to it. Provided for example.
If you're interested, I have an improved version of the NGF framework that adds keyboard/mouse support, vertex and pixel shader support, bone and skin meshing, and some limited physical modeling features. Please email me if you're interested in purchasing the source.