Installation (VC6 version)

Overview of the generated project (VC6 version)

Projects generated with this AppWizard contains two classes:

CApp

CMainWnd

There is a global instance of CApp (gApp) that owns an instance of CMainWnd (m_pMainWnd). CApp creates the main window, initializes OpenGL, maintains the message pump and manages screen updates. CMainWnd encapsulates the main window and its OpenGL rendering context. CApp notifies CMainWnd of different phases of the OpenGL RC life cycle (by calling CMainWnd::InitScene(), CMainWnd::KillScene() and CMainWnd::DrawScene()). CMainWnd::Tick() is called (by CApp) each time the windows message queue is empty.

This may not be the most elegant OO solution; some of the code in CApp really belongs in CMainWnd, like window creation and (some of the) message handling. But the idea is to let CApp do the grunt work of Win32API and OpenGL setup and leave CMainWnd free to concentrate on what's displayed in the client area.

Using the wizard

Chose to create a new project, selecting "OpenGL Win32 Application" from the list of project types, enter a project name and press OK.

The following options to customize the project are available:

Application

Menu: Check this box to add a menu to the main window.Keyboard accelerator: Adds a keyboard accelerator resource and processes accelerator keys.About box: Creates an about dialog and a dialog callback routine. Also adds an About command to the menu (if available).

Main window

Select appearance of the main window.

Window: Creates an overlapped main window with default size. Fullscreen: Creates a topmost popup window that occupies the entire screen. Both: Appearence is determined with a switch: If FULLSCREEN is not #defined, the application runs in a window.Show FPS in caption: Adds code to show Frames Per Second on regular intervals. (Not available in fullscreen mode)

OpenGL Support

Use OpenGL: Adds code to initialize and maintain an OpenGL RC. If this box is not checked, a plain Win32 application is created.Sample code: Adds code that renders a simple OpenGL scene (spinning cube).Double buffering: Creates a double-buffered pixel buffer.Color depth: Number of color bitplanes in each color buffer.Z-buffer depth: Bit-depth of the Z-buffer.Background color: Press the button to select background color for main window.

Notes on the VC++.NET appwizard

In VC++.NET, appwizards are no longer compiled plugins, but rather a collection of scripts and template files, with a HTML-based UI. See Readme.txt for installation instructions.

I took the opportunity to change the object model into something that, IMO, is a bit cleaner. Instead of having one class for the window and one class for the application, there is now one abstract base class, CApp, that takes care of window creation, OpenGL initialization etc. The "meat" of the generated app goes in a derived class that overrides a number of virtual functions of CApp. For example, InitScene(),DrawScene() and KillScene() are virtual.

Other than that, the VC++.NET version of the AppWizard behaves basically the same as the VC++6 version.

History

20 May 2003 - Updated VS.NET download

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

The following happens:
- In the Visual c++ projects folder I choose a new OGLWiz (and give it a name)
- when I click on "OK" nothing happens
- after a while (few seconds) I get following bug report:
<<Microsoft Development Environment has encountered a problem and needs to close. We are sorry for the inconvenience.>>
- The data of this report contains:
* Error details: An unhandled exception has been caught by the VSW exception filter.
* Error signature: AppName: devenv.exe AppVer: 7.0.9466.0 ModName: unknown ModVer: 0.0.0.0 Offset: 039a6d28

Does this satisfies or do you need the technical information about the error report.
Maybe it's a stupid fault, but I'm new to C++, VS .net and opengl??

Weird, but I can't find a way to reproduce this error. Tested the wizard on 3 different machines with no problems. If you installed the wizard correctly, maybe it's a language issue. Do you have a localized VS.NET? What edition & build are you using?

I did a few Usenet searches on similar errors, and it seems like MS typically gives the suggestion to install the latest service packs for Internet Explorer, multi-language pack and VS.

Please let me know if this fixes the problem. Has anyone else seen this?

I have the same problem. I have installed the tool, and ran it once successfully, i.e. I saw the wizard, but I hit escape, because I had sth else to do... Then, now I have the same behaviour like the others, VC .Net crashes...

I have Development Environment 7.0.9466
MS .Net Framework 1.0 Version 1.0.3705

The problem is at the html page of the wizard.The script in the page tries to set defaults symbols value using the following command: window.external.SetDefaults(document);but the html has no SYMBOL tag in it.

To fix it, add at least one SYMBOL tag. For example: (add it in the HEAD section )<SYMBOL NAME='WIZARD_DIALOG_TITLE' TYPE=text VALUE='TestWizard'></SYMBOL>