Benefits of OpenGC
Got an idea for a cool gauge? Here's a brief rundown of why OpenGC is place to implement it:
-
Window management - OpenGC encapsulates the process of window management through Glut, provides a system for translating between screen and physical coordinates, and in general handles everything you need to use OpenGL without you having to worry about the particulars.
-
Font management - Fonts under OpenGL have been notoriously difficult to implement. OpenGC uses the FTGL toolkit, allowing you to render any Truetype font, any size, any color, any position, in smoothed and non-smoothed modes.
-
Flight-sim data encapsulation - OpenGC contains a base class called ogcDataSource, from which are derived specific classes for each supported sim/platform combination. For example, FS2000 is supported by the ogcFSUIPCDataSource class. However, gauges are programmed with respect to the data members of the ogcDataSource base class and are therefore compatible with any of the sims OpenGC supports.
-
Reusability - Gauges consist of GaugeComponents. When a GaugeComponent cannot be directly recycled, it's usually possible to create a new Component by modifying an existing one. After all, there are only so many ways to create an artificial horizon.
-
Simplicity - The above four points aside, it's possible to create a new gauge or gauge component in a very short period of time. New gauges simply overload the constructor of the ogcGauge base class in order to specify their particular Components, and each Component only needs to overload the Render() function of ogcGaugeComponent. Translation: even if you don't know C++, you can easily program a gauge in an object oriented environment.