Darkside,

That was the solution, but I just verified that it was a few minutes ago (Had a chance to put the ideas to code).

My framerate is several times greater than it was before. For anyone reading this with similar issues, here are the changes I made:

1. In my game.Draw() method, I now calculate the view and projection matrices once per frame instead of once per mesh (the Microsoft examples do it once per mesh). The projection matrix really only needs to be updated when the aspect ratio changes and I may move it later. This change increased my framerate by a factor of two.

//*** Update view and projection matrices

Matrix viewMatrix = Matrix.CreateLookAt(cameraPosition, cameraTarget,

Vector3.Up);

Matrix projectionMatrix = Matrix.CreatePerspectiveFieldOfView(MathHelper.ToRadians(45.0f),

aspectRatio, 1.0f, 10000.0f);

2. In my game.Draw() method, I calculate the view frustum:

//*** Calculate view frustum

BoundingFrustum viewFrustum = new BoundingFrustum(this.viewMatrix * this.projectionMatrix);

3. In my game.Draw() method, for each model I need to draw, I first check to see if it is contained in the view frustum. I currently have two simplifications in place that others may need to expand on for their project:

(a) I don't consider each mesh in the model invdividually to determine if it is inside the view frustum. I construct a bounding sphere that is big enough to contain the entire object which will cause a bit more drawing than would be required if I clipped at the mesh level.

(b) I have not utilized a quadtree (or other structure) to more efficiently partition the model/mesh space. I traverse and consider my models linearly which gives me an algorithmic complexity of O(n). In my application, I don't have a huge number of objects so I'm getting away with this for now. I may need a quadtree later.

Even with these simplifications this change increased my framerate by another factor of 2 or 3.

//*** Draw floors

foreach (Floor floor in this.floorList)

{

BoundingSphere bs = new BoundingSphere(floor.getLocation(), Floor.getFloorWidth()/2.0f);

if (!viewFrustum.Contains(bs).Equals(ContainmentType.Disjoint))

{

floor.Draw(viewMatrix, projectionMatrix);

}

}