private void Draw3DData() { device.Set3DMode(); foreach (var lineBuffer in lineBuffers) { if (lineBuffer.Is3D && lineBuffer.NumberOfActiveVertices > 0) { DrawBufferAndIncreaseStatisticsNumbers(lineBuffer); } } foreach (var sortedGeometry in sortedShaderGeometries) { sortedGeometry.Draw(); } sortedShaderGeometries.Clear(); foreach (var pair in buffersPerBlendMode) { foreach (var buffer in pair.Value) { if (buffer.Is3D && buffer.NumberOfActiveVertices > 0) { DrawBufferAndIncreaseStatisticsNumbers(buffer); } } } }
public void CameraShouldBeAbleToHandleViewportChanges() { new Grid3D(new Size(5)); usedDevice = Resolve<Device>(); usedWindow = Resolve<Window>(); Matrix originalProjectionMatrix = usedDevice.CameraProjectionMatrix; usedWindow.ViewportPixelSize = new Size(400, 300); usedDevice.Set3DMode(); Assert.AreNotEqual(originalProjectionMatrix, usedDevice.CameraProjectionMatrix); }
protected void DrawEverythingWhenBufferIsFull() { if (Is3D) { device.Set3DMode(); } else { device.Set2DMode(); } DrawAllTextureChunks(); }