Difference between revisions of "Source graphics"

From FreeSpace Wiki
Jump to: navigation, search
 
m (same here, essentially)
 
Line 1: Line 1:
==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 initializing the screen, page flipping, displaying primitives etc.). There are basically two sets of source files: grd3d* (DirectX) and gropengl* (OpenGL).  
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==
 
==Major Classes/Functions/Structs==

Latest revision as of 22:12, 5 April 2010

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).

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)