コード例 #1
0
        public OpenGlWindow(int width, int height, string title, OpenGlVersion openGlVersion)
            : base(width,
            height,
            GraphicsMode.Default,
            title,
            GameWindowFlags.Default,
            DisplayDevice.Default,
            openGlVersion.Major,
            openGlVersion.Minor,
            GraphicsContextFlags.Default)
        {
            _mouseInputProcessor = new MouseInputProcessor(this, new GuiToRelativeCoordinateTransformer());

            var buttonUpEventEvaluator = new ButtonUpActionEvaluator(_mouseInputProcessor);
            _mouseInputObservable = new MouseInputObservable(buttonUpEventEvaluator);

            _keyboardInputObservable = new KeyboardInputObservable(_keyboardInputProcessor);

            _camera = new LookAtCamera();
            _lodCamera = new LookAtCamera();
        }
コード例 #2
0
        public OpenGlWindow(int width, int height, string title, OpenGlVersion openGlVersion)
            : base(
                width,
                height,
                GraphicsMode.Default,
                title,
                GameWindowFlags.Default,
                DisplayDevice.Default,
                openGlVersion.Major,
                openGlVersion.Minor,
                GraphicsContextFlags.Default)
        {
            _mouseInputProcessor = new MouseInputProcessor(this, new GuiToRelativeCoordinateTransformer());

            var buttonUpEventEvaluator = new ButtonUpActionEvaluator(_mouseInputProcessor);

            _mouseInputObservable = new MouseInputObservable(buttonUpEventEvaluator);

            _keyboardInputObservable = new KeyboardInputObservable(_keyboardInputProcessor);

            _camera    = new LookAtCamera();
            _lodCamera = new LookAtCamera();
        }