public ConsoleGame(int width, int height) { _width = width; _height = height; _device = new Device(width, height); _scene = Scenes.BoxScene(); }
public MainWindow() { InitializeComponent(); _width = (int)displayImage.Width; _height = (int)displayImage.Height; _fullRect = new Int32Rect(0, 0, _width, _height); _stride = _width * _pixelFormat.BitsPerPixel / 8; _device = new Device(_width, _height); _scene = Scenes.BoxScene(); _frontBuffer = new WriteableBitmap(_width, _height, DPI, DPI, _pixelFormat, null); displayImage.Source = _frontBuffer; CompositionTarget.Rendering += CompositionTarget_Rendering; }