Tutorials and MFC
Thanks Joel for your help - Would you say it is better not to use the document / view architecture when using opengl with MFC ?
September 28, 2000 05:40 PM
quote: Original post by ogl
Thanks Joel for your help - Would you say it is better not to use the document / view architecture when using opengl with MFC ?
It depends on what you want to do. You can approach MFC from the ground up (see the book by Shildt) or you can let the VC++ app wizard do the work for you. If you use the App wiz you need to chose either a Dialog, SDI or MDI application( or some variants). Wiz created SDI and MDI automatically by default have the document / view architecture (I''ll call the dva from now on). This architechture is loosely based on an OOP paradigm. The dva gives you many things like print and print preview things that many people are not likely to use with opengl. It is quit a chore to print an OpenGL scene because MS printer drivers don''t support OpenGL and MS hasn''t seen fit to a the functionality to do this easily. And the wiz adds all kinds of strange stuff that it needs and does not want the programmer to mess with and scares some away from MFC. If you just want an opengl scene you don''t need the dva. The simple MFC window is enough to do the job and you could probably use this to translate all of NeHe''s tutorials. If you want a few interactive controls, a dialog box with a picture control for an OpenGl window will do. The example on the OpenGL Developer FAQ is a SDI app with a Formview and it has all the simplicity of a Dialog app with dva support. If you wanted to write a 3D CAD program you should start with SDI or MDI. Personally I haven''t found much use for the document / view architecture so far; how ever you may have some use for it.
Joel
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement