protected override void OnPaint(PaintEventArgs e) { if (GlImage == null) { return; } if (Math.Abs(m_currentImageView.Width) < Eps) { CreateImageView(); } GlWindow.Begin(); Gl.Clear(Gl.GL_COLOR_BUFFER_BIT | Gl.GL_DEPTH_BUFFER_BIT); GlWindow.DrawImage(GlImage, ControlView, m_currentImageView); GlWindow.End(); GlWindow.SwapBuffers(); base.OnPaint(e); }
protected override void OnPaint(PaintEventArgs e) { if (m_imageBoxWindow == null) { return; } m_glWindow.Begin(); Gl.Clear(Gl.GL_COLOR_BUFFER_BIT | Gl.GL_DEPTH_BUFFER_BIT); if (m_imageBoxWindow.GlImage != null) { m_glWindow.DrawImage(m_imageBoxWindow.GlImage, GetImageView()); m_glWindow.DrawRectangle(new Pen(BorderColor, BorderWidth), GetImageRectangle()); } m_glWindow.End(); m_glWindow.SwapBuffers(); base.OnPaint(e); }