Example #1
0
        protected override void OnRenderFrame(FrameEventArgs e)
        {
            base.OnRenderFrame(e);

            GL.Viewport(0, 0, Width, Height);
            GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit);
            GL.Enable(EnableCap.DepthTest);
            GL.Enable(EnableCap.Blend);
            GL.BlendFunc(BlendingFactorSrc.SrcAlpha, BlendingFactorDest.OneMinusSrcAlpha);

            if (SceneRenderer.WorkMode)
            {
                float xPosText = (-1) * (ClientSize.Width / 2) + 6;
                float yPosText = (ClientSize.Height / 2) - 16;
                _text.RenderText(@"Display mode:", xPosText, yPosText, new Vector3(0.0f, 0.0f, 0.0f));
                _text.RenderText(string.Format("All parts: {0}", _gameObject.Model.DisplayMode.ToString()), xPosText, yPosText - 15, new Vector3(0.0f, 0.0f, 0.0f));
                if (_gameObject.SelectedPart != null)
                {
                    _text.RenderText(string.Format("Choosed part: {0}", _gameObject.SelectedPart.DisplayMode), xPosText, yPosText - 30, new Vector3(0.0f, 0.0f, 0.0f));
                }
            }

            _scene.Draw();
            SwapBuffers();
        }
Example #2
0
 protected override void Draw(GameTime gameTime)
 {
     _screenManager.OnEarlyDraw(gameTime);
     _renderer.Draw();
     _screenManager.OnLateDraw(gameTime);
     _notificationBarOverlay.Draw(_spriteBatch);
     base.Draw(gameTime);
 }