public override void BeginFrame()
{
if (activeViewport == null)
throw new AxiomException( "BeingFrame cannot run without an active viewport." );
// begin the D3D scene for the current viewport
ActiveD3D9Device.BeginScene();
_lastVertexSourceCount = 0;
// Clear left overs of previous viewport.
// I.E: Viewport A can use 3 different textures and light states
// When trying to render viewport B these settings should be cleared, otherwise
// graphical artifacts might occur.
_deviceManager.ActiveDevice.ClearDeviceStreams();
}