Contains both high-level and low-level routines for handling 3d graphics primitives. To allow for rendering with either DirectX or OpenGL, the graphics engine uses a structure (gr_screen) with function pointers to all the standard 3d operations (such as initializing the screen, page flipping, displaying primitives etc.). There are basically two sets of source files: grd3d* (DirectX) and gropengl* (OpenGL).
|gr_screen/screen global struct||res, mode, aspect etc.||Contains all info about screen setup (bits, resolution, etc)|
|gf_* functions||Wraps standard 3d functions such as page flip, render buffer etc. allowing the engine to abstract DirectX and OpenGL functions.|
|gf_render_buffer()||Main rendering call for models (ships etc.). Wraps buffer rendering modes in DirectX/OpenGL.|
|gr_* functions||gr_init()||Initialises graphics engine (either DirectX or OpenGL)|