Difference between revisions of "Source graphics"

From FreeSpace Wiki
Jump to: navigation, search
(No difference)

Revision as of 09:38, 13 February 2006

Summary

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 initialising the screen, page flipping, displaying primitives etc.). There are basically two sets of source files: grd3d* (DirectX) and gropengl* (OpenGL).

Major Classes/Functions/Structs

Class/Group/Struct Method/Function/Element Notes
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)