Beispiel #1
0
 protected override void Draw()
 {
     if (_activeProfile > -1)
     {
         _profiles[_activeProfile].Draw();
     }
     else
     {
         SoftwareRasterizer.ClearBitmap(CurrentSwapchainBuffer, System.Drawing.Color.CornflowerBlue);
     }
     base.Draw();
 }
Beispiel #2
0
        void initializeResources()
        {
            _swapchainBuffers = new Bitmap[SWAPCHAIN_BUFFER_COUNT];
            _depthBuffers     = new float[SWAPCHAIN_BUFFER_COUNT][, ];

            for (int i = 0; i < SWAPCHAIN_BUFFER_COUNT; i++)
            {
                _swapchainBuffers[i] = new Bitmap(800, 600);
                _depthBuffers[i]     = new float[800, 600];

                SoftwareRasterizer.ClearBitmap(_swapchainBuffers[i], Color.CornflowerBlue);
                SoftwareRasterizer.ClearDepth(_depthBuffers[i]);
            }
        }