-
Book Overview & Buying
-
Table Of Contents
Direct3D Rendering Cookbook
Up to this point, we have used a left-handed coordinate system, where the z axis points away from the view. The Visual Studio graphics content pipeline assumes a right-handed coordinate system when producing .cmo files. For the resulting 3D models we use for the remainder of this book, use a clockwise vertex winding order. The difference between left-handed and right-handed coordinates can be seen in the following figure:

Left-handed versus right-handed Cartesian coordinates – note that the z axis is reversed
In this recipe, we will look at the changes necessary to use a right-handed coordinate system and what this means for our 3D assets. This recipe can be applied to any SharpDX Direct3D application.
We will first step through the changes to the view and projection setup and then look at the changes necessary to the vertices within the simple QuadRenderer class.
When creating the view matrix, use SharpDX.Matrix.LookAtRH instead of SharpDX...
Change the font size
Change margin width
Change background colour