This post introduces how to drawing opengl on the mfc dialog.
If we are using COpenGLControl class, this work is very easy and simple.
Fi rstly, get the COpenGLControl class in the web or on this.
1. In the ~Dlg.h, Add header file and member variable
#include "OpenGLControl.h"
~
COpenGLControl m_oglWindow;
2. Add below source code in the OnInitDialog() function.
CRect rect;
// Get size and position of the template textfield we created before in the dialog editor
GetDlgItem(IDC_PIC_OPENGL)->GetWindowRect(rect);
// Convert screen coordinates to client coordinates
ScreenToClient(rect);
// Create OpenGL Control window
m_oglWindow.oglCreate(rect, this);
// Setup the OpenGL Window's timer to render
m_oglWindow.m_unpTimer = m_oglWindow.SetTimer(1, 1, 0);
* You have to set picture box option as "Visible is False".
The source code is here.
8/20/2012
source code - OpenGL Drawing on MFC dlg(using COpenGLControl class)
Subscribe to:
Post Comments (Atom)
-
* Introduction - The solution shows panorama image from multi images. The panorama images is processing by real-time stitching algorithm...
-
This is data acquisition source code of LMS511(SICK co.) Source code is made by MFC(vs 2008). The sensor is communicated by TCP/IP. ...
-
Calculate overlap percent between two rectangle It is not difficult, we just use bit operator : &, | for more detail informati...
-
As you can see in the following video, I created a class that stitching n cameras in real time. https://www.youtube.com/user/feelmare/sear...
-
Very Nice Convoluiton Convolution (korean) https://gaussian37.github.io/dl-concept-covolution_operation/ ✌️
-
In past, I wrote an articel about YUV 444, 422, 411 introduction and yuv rgb converting example code. refer to this page -> http://feel...
-
fig 1. Left: set 4 points (Left Top, Right Top, Right Bottom, Left Bottom), right:warped image to (0,0) (300,0), (300,300), (0,300) Fi...
-
Dear Jihad anwar Here is source code you asking. I don't remember equation about particle filter well now. But source code is ...
-
Google Coral USB Edge TPU Implementation Guide 1. Installation and Troubleshooting 1.1 Hardware Requirements Google Coral USB Accelerator ...
-
I use MOG2 algorithm to background subtraction. The process is resize to small for more fast processing to blur for avoid noise affectio...
No comments:
Post a Comment