コード例 #1
0
 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);
             }
         }
     }
 }
コード例 #2
0
ファイル: CameraTests.cs プロジェクト: whztt07/DeltaEngine
		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);
		}
コード例 #3
0
 protected void DrawEverythingWhenBufferIsFull()
 {
     if (Is3D)
     {
         device.Set3DMode();
     }
     else
     {
         device.Set2DMode();
     }
     DrawAllTextureChunks();
 }