Using BGL to Create Objects, Stand-Alone Code vs. BGL Files

You can use BGL code to generate images in Flight Simulator in one of two ways, using stand-alone code or BGL files.

Using stand-alone BGL code, you can draw lines, polygons, and other graphics entities in the active window by simply making a list of BGL commands, setting the 32-bit input buffer pointer (IBP) to point to the first command in the list, and invoking the BGL graphics interpreter. You can do this from a C or assembly language module in Flight Simulator or from application attached to Flight Simulator.

Stand-alone BGL code can be, and usually is, much less geographic in nature than code in BGL files. For example, the stand-alone BGL code used to create aircraft and other vehicle designs doesn't situate the design in the world’s reference frame, but rather defines an overall design that other applications can place within the world’s coordinates.

Note: Seeds aren't used in stand-alone scenery design because they require highly structured files, such as a BGL file.

Flight Simulator scenery design, as well as navigational aids information, facilities information, the earth’s magnetic variations, and other miscellaneous information, is contained in highly structured files called BGL files. You can create one of these files, put BGL code into it in the appropriate sections, put the file in the Scenery directory on hard disk or any other file system (CD-ROM, floppy, and so on.), and your scenery designs will be displayed along with the scenery designs included in Flight Simulator's scenery database.

Scenery in BGL files is geographic in nature; that is, it's usually firmly locked to the world’s coordinate system and seeds are defined in a very specific geographic fashion. For more information, see the topics in the Coordinate Conventions section of this SDK.