In the first step, the graphics device is initialised to a 500 x 500 view.
In the second step, the effects file is loaded and incorporated into
Draw. In the draw method, Riemer uses
device.Clear(Color.DarkSlateBlue). But there is a property on
GraphicsDevicethat I am using instead. A technique in the effect file called
Pretransformedis used -- but nothing is in fact drawn using this technique.
In the third step, a triangle is drawn. Now the meaning of
Pretransformedbecomes clear - it is used as a simple rendering method of the triangle. The technique avoids the need for a camera. The triangle is specified as a set of three vertices and rendered on the draw method.
At this point I deviated from Riemer a bit and I created a
RiemersTriangle. Moving away from the single class approach followed in the tutorial. For the component, the
VertextDeclarationcannot be done on
Initialise, and I had to add an override for
LoadContentand put it there. The
GraphicsDeviceis not available during
InitialiseAdd the component to the
Anyhow, that concludes lesson 1 -- we have a pre-transformed triangle to show for our effort