Game Development Reference
In-Depth Information
Figure 11.1
A 3D pyramid.
class Test3DState : IGameObject
{
public Test3DState(){}
public void Update(double elapsedTime){ }
public void Render()
{
Gl.glDisable(Gl.GL_TEXTURE_2D);
Gl.glClearColor(1, 1, 1, 0);
Gl.glClear(Gl.GL_COLOR_BUFFER_BIT);
// This is a simple way of using a camera
Gl.glMatrixMode(Gl.GL_MODELVIEW);
Gl.glLoadIdentity();
Vector cameraPosition = new Vector(-75, 125, -500); // half a meter back
on the Z axis
Vector cameraLookAt = new Vector(0, 0, 0); // make the camera look at the
world origin.
Vector cameraUpVector = new Vector(0, 1, 0);
Search WWH ::




Custom Search