RCShader & RCShaderManager
I will start with the Shader classes. The ShaderManager is as the tutorial has it but has the Hashtable replaced with a Dictionary.
Basically I have redefined the myShaders container and added a variable to manage the index like this:
Altered the AddShader method like this:
And replaced the foreach loop with a for loop in the LoadGraphicsContent method lie this:
The Shader class it's self however has been reworked to use Semantics. The class has stayed essentially the same, however the SetParameters method has been totally redone.
You will see above three ways of creating the World matrix, one is the one given in the tutorial, Scale * Rotation * Position, another is used when the UseLeftHandedWorldCalc property is set to true in myObject. I put this in as I was having some issues with a few shaders I found. The issue was that the models where not rotating but revolving when I called the rotate method on them, I thought this was due to the shaders having been written for a left handed system (XNA is right), being new to all this 3D stuff I could not alter the shader to behave properly so altered the world calculation for them so it would and the Scale * Position * Rotation method seemed to do the trick. If I ever get a better solution to this or find why it behaves like it does for the shaders I will post the fix here. The third method is only ever really used for my billboard class to keep the Textured Quad facing the camera.
RCTexturedQuad & RC2SidedTexturdeQuad
With the base Textured Quad code I have just added the ability to allow for alpha checking (image transparency). I have done this by adding a field and associated property called alphacheck. If set to true the Render method of the TQ sets the render state to use the alpha test.
This code is called before the Vertex declaration:
and this after to put the states back as they were if needed:
The bounding box for the Textured Quad is managed like this in the Render method:
I have also added a double sided textured quad, this is basically 2 textured quads back to back, displaying the same image.
RCCamera & RCCameraManager
Again there is very little deviation here, I have added an enumerator to manage the different camera types I want to use and added a field with an associated property of this type to the RCCamera class.
This tells me what kind of movement the camera should have and is managed in the calling assembly.