programming / C++ / sailing / nerd stuff
wxWidgets Tutorial 3: More interactive OpenGL Application
© 2005 / Mario Konrad

This tutorial is basically the same application as shown in Tutorial 2 but has more interactivity (rotation using the mouse, menus, etc.). Features of this demo are:

The wxWindow related things is primary the menu handling and the application which reacts to the events generated.

The interesting part related to the grahics is definetly the class Trackball. This code is ported from an plain C implementation of a virtual trackball. Please have a look at the copyright note in front of the class. Initialization of the OpenGL engine is a bit more complex, the rendering of the scene also. But nothing you will not see in any other OpenGL application.


Building the executable


$ g++ -c gl1.cpp wx-config --cxxflags
$ g++ -o gl1 gl1.o wx-config --libs --gl-libs -lglut


$ g++ -c gl1.cpp wx-config --cxxflags
$ g++ -o gl1 gl1.o -lglut32 wx-config --libs --gl-libs

Using the makefile:

$ make gl1

Running the Demo

$ ./gl1