Texturing, Matrices and Quaternions
With a graphics and math demonstration due sometime next week I’ve made a fairly quick start on a few new additions from last week’s simple terrain demonstration. Now having a basic idea of how vertices are laid out I’ve gone ahead and added textures as well as lighting to the DirectX demo as well as a custom made math library without the use of DirectX’s own math functions.
Right now vectors and matrices are completely functional and can be manipulated in a numerous ways. Dot products, inverse (the picture above shows an inverse matrix), transpose, cross products, addition, subtraction and a few others. It’s nice to know how the very core of a graphics library works without having a graphics engine encapsulating everything away from the programmer’s control.
Right now I’m still working on getting a Quaternion class written which concludes the demonstration of 3D graphic maths at this stage of my course. Finally, my last focus will be on the graphics engine itself which is due sometime next week.
This is still using DirectX 9, which since I’m not using shaders won’t do my knowledge much good if I decide to move on to DirectX 11 which relies entirely on shaders. However I’ll be looking into these over the next few weeks to expand my knowledge on this.