コード例 #1
0
ファイル: Zadanie1.cs プロジェクト: windless1015/graf3d
 /// <summary>
 ///     Obsługuje zdarzenie na chwilę przed wyrenderowaniem okna.
 ///     W tym miejscu będziemy renderować klatki z kamery 3D.
 /// </summary>
 private void CompositionTargetOnRendering(object sender, object e)
 {
     if (!_view.IsCameraVisible)
     {
         return;                           // Nie renderuj gdy okno jest schowane.
     }
     _bmp.Clear(Colors.Black.ToColor32()); // Ustawia czarne tło.
     _device.Render(_scene);               // Renderuje klatkę sceny 3D.
     _bmp.Present();                       // Wypycha wyrenderowaną bitmapę do GUI.
     _fpsCounter.Tick();                   // Aktualizuje licznik FPS.
 }
コード例 #2
0
        // Renders frames from the 3D camera.
        private void CompositionTargetOnRendering(object sender, EventArgs e)
        {
            if (!_view.IsCameraVisible)
            {
                return;
            }

            _bmp.Clear(Engine.Utilities.Colors.Black.ToColor32());
            _device.Render(_scene); // Renders the frame of the 3D scene.
            _bmp.Present();         // Pushes the rendered bitmap to the GUI.
        }