-
OpenGL & MFC
Can someone point me to a good tutorial of how to setup OpenGL in an MFC environment? I am reading a ton of tutorials, but they explicitly state that I can understand this tutorial easily if I know how to setup the CView class to work with OpenGL (which I do not, hehe).
Any help would be appreciated, thanks a bunch!
-
-
Re: OpenGL & MFC
Hi !
Have a look at www.codeguru.com, there are some OpenGL tutorials that use MFC that might help.
Mikael
-
Re: OpenGL & MFC
Thanks for the tips. I found one tutorial that supplied a wrapper class in order to interface directly between MFC and OpenGL. If you are interested, this is the link: http://www.codeguru.com/opengl/oglwrapperclass.shtml
It is designed for a MDI, but worked fine with my SDI implementation. Thanks again for the pointers; it sent me on the right track!
-
Re: OpenGL & MFC
Hi,
Try on this website. A good example can be found there.
http://myopendemo.hypermart.net
-
Member
Regular Contributor
Re: OpenGL & MFC
cwc36,
Why when I resize the OpenGL screen in the MFC, the square isn't centered ?.
In fact, if we change the size of the OpenGL IDC_SCREEN, the square isn't centered ?
-
Re: OpenGL & MFC
Make sure you update the matrices correct when the window is resized (gluPerspective or what ever you use).
Mikael
-
Re: OpenGL & MFC
Hi,
Try to replace this command GetClientRect(&rect) with m_map_window.GetClientRect(&rect)in OnInitDialog();
That is used to get size of the window. The cube is not center because the width and height of windows is not based on the IDC_SCREEN.
[This message has been edited by cwc36 (edited 11-03-2003).]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules