View Full Version : MFC &OpenGL
I have OpenGL code that I have to insern to MFC project, how can I do that?
Is there any Example that I work with?
Try MFC & OpenGL at
11-04-2002, 08:49 PM
I strongly suggest you not to use MFC. Using MFC is only adding another layer between your code and openGL renderer. And, besides, OpenGL engine is NOT compatibile with C++ class syntax, since it uses in-state rendering, which means a sort of "brush" properties for the renderer. To query OpenGL variables you need to call a function anyway, so having MFC inbetween is not a good idea.
11-05-2002, 05:36 AM
Uh... there's nothing wrong with using C++ and OpenGL. In fact, I thing using an OOD tends to make 3d graphics in general a bit easier.
Generally I'd agree with staying away from MFC if you are doing something like a game. But if you are doing something like a modeller, or some other type of viewer it's perfectly acceptable, and can make a lot of the windowing stuff easier for you.
11-05-2002, 05:53 AM
OpenGL engine is NOT compatibile with C++ class syntax
11-05-2002, 08:37 AM
While I wouldn't use MFC in a game engine, the use of OpenGL with MFC is otherwise perfectly harmless in my opinion.
MFC neatly adds an abstraction layer above Windows to make message pump handling easier and provides utility and collection classes among other constructs.
Here's a simple example of a small program that uses MFC to decode 3D Studio MAX meshes, displaying the mesh with OpenGL:
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.