Open source remastering of the Freespace 2 engine
gropengl.cpp File Reference

Go to the source code of this file.


typedef int(* PFNGLXSWAPINTERVALSGIPROC) (int interval)


void opengl_save_mouse_area (int x, int y, int w, int h)
void gr_opengl_set_gamma (float gamma)
void opengl_go_fullscreen ()
void opengl_go_windowed ()
void opengl_minimize ()
void gr_opengl_activate (int active)
void gr_opengl_clear ()
void gr_opengl_flip ()
void gr_opengl_set_clip (int x, int y, int w, int h, int resize_mode)
void gr_opengl_reset_clip ()
void gr_opengl_set_palette (const ubyte *new_palette, int is_alphacolor)
void gr_opengl_print_screen (const char *filename)
void gr_opengl_cleanup (int minimize)
void gr_opengl_fog_set (int fog_mode, int r, int g, int b, float fog_near, float fog_far)
int gr_opengl_set_cull (int cull)
void gr_opengl_set_clear_color (int r, int g, int b)
int gr_opengl_set_color_buffer (int mode)
int gr_opengl_zbuffer_get ()
int gr_opengl_zbuffer_set (int mode)
void gr_opengl_zbuffer_clear (int mode)
int gr_opengl_stencil_set (int mode)
void gr_opengl_stencil_clear ()
int gr_opengl_alpha_mask_set (int mode, float alpha)
void gr_opengl_get_region (int front, int w, int h, ubyte *data)
int gr_opengl_save_screen ()
void gr_opengl_restore_screen (int bmp_id)
void gr_opengl_free_screen (int bmp_id)
void gr_opengl_set_fill_mode (int mode)
void gr_opengl_zbias (int bias)
void gr_opengl_push_texture_matrix (int unit)
void gr_opengl_pop_texture_matrix (int unit)
void gr_opengl_translate_texture_matrix (int unit, const vec3d *shift)
void gr_opengl_set_line_width (float width)
const char * opengl_error_string ()
int opengl_check_for_errors (char *err_at)
void opengl_set_vsync (int status)
void opengl_setup_viewport ()
void gr_opengl_shutdown ()
void opengl_close ()
int opengl_init_display_device ()
void opengl_setup_function_pointers ()
bool gr_opengl_init ()
 DCF (ogl_minimize,"Minimizes opengl")
 DCF (ogl_anisotropy,"toggles anisotropic filtering")
bool is_minimum_GLSL_version ()


int GL_version = 0
int GLSL_version = 0
bool GL_initted = 0
int OGL_fogmode = 0
int Use_VBOs = 0
int Use_PBOs = 0
const char * Osreg_title
GLfloat GL_anisotropy
float FreeSpace_gamma

Typedef Documentation

typedef int( * PFNGLXSWAPINTERVALSGIPROC) (int interval)

Definition at line 42 of file gropengl.cpp.

Function Documentation

DCF ( ogl_minimize  ,
"Minimizes opengl"   

Definition at line 1995 of file gropengl.cpp.

DCF ( ogl_anisotropy  ,
"toggles anisotropic filtering"   

Definition at line 2015 of file gropengl.cpp.

void gr_opengl_activate ( int  active)

Definition at line 287 of file gropengl.cpp.

int gr_opengl_alpha_mask_set ( int  mode,
float  alpha 

Definition at line 799 of file gropengl.cpp.

void gr_opengl_cleanup ( int  minimize)

Definition at line 587 of file gropengl.cpp.

void gr_opengl_clear ( )

Definition at line 312 of file gropengl.cpp.

void gr_opengl_flip ( )

Definition at line 321 of file gropengl.cpp.

void gr_opengl_fog_set ( int  fog_mode,
int  r,
int  g,
int  b,
float  fog_near,
float  fog_far 

Definition at line 633 of file gropengl.cpp.

void gr_opengl_free_screen ( int  bmp_id)

Definition at line 1132 of file gropengl.cpp.

void gr_opengl_get_region ( int  front,
int  w,
int  h,
ubyte data 

Definition at line 903 of file gropengl.cpp.

bool gr_opengl_init ( )

Definition at line 1832 of file gropengl.cpp.

void gr_opengl_pop_texture_matrix ( int  unit)

Definition at line 1197 of file gropengl.cpp.

void gr_opengl_print_screen ( const char *  filename)

Definition at line 480 of file gropengl.cpp.

void gr_opengl_push_texture_matrix ( int  unit)

Definition at line 1181 of file gropengl.cpp.

void gr_opengl_reset_clip ( )

Definition at line 453 of file gropengl.cpp.

void gr_opengl_restore_screen ( int  bmp_id)

Definition at line 1114 of file gropengl.cpp.

int gr_opengl_save_screen ( )

Definition at line 983 of file gropengl.cpp.

void gr_opengl_set_clear_color ( int  r,
int  g,
int  b 

Definition at line 704 of file gropengl.cpp.

void gr_opengl_set_clip ( int  x,
int  y,
int  w,
int  h,
int  resize_mode 

Definition at line 365 of file gropengl.cpp.

int gr_opengl_set_color_buffer ( int  mode)

Definition at line 709 of file gropengl.cpp.

int gr_opengl_set_cull ( int  cull)

Definition at line 689 of file gropengl.cpp.

void gr_opengl_set_fill_mode ( int  mode)

Definition at line 1150 of file gropengl.cpp.

void gr_opengl_set_gamma ( float  gamma)

Definition at line 872 of file gropengl.cpp.

void gr_opengl_set_line_width ( float  width)

Definition at line 1233 of file gropengl.cpp.

void gr_opengl_set_palette ( const ubyte new_palette,
int  is_alphacolor 

Definition at line 476 of file gropengl.cpp.

void gr_opengl_shutdown ( )

Definition at line 1316 of file gropengl.cpp.

void gr_opengl_stencil_clear ( )

Definition at line 794 of file gropengl.cpp.

int gr_opengl_stencil_set ( int  mode)

Definition at line 774 of file gropengl.cpp.

void gr_opengl_translate_texture_matrix ( int  unit,
const vec3d shift 

Definition at line 1213 of file gropengl.cpp.

void gr_opengl_zbias ( int  bias)

Definition at line 1166 of file gropengl.cpp.

void gr_opengl_zbuffer_clear ( int  mode)

Definition at line 753 of file gropengl.cpp.

int gr_opengl_zbuffer_get ( )

Definition at line 724 of file gropengl.cpp.

int gr_opengl_zbuffer_set ( int  mode)

Definition at line 733 of file gropengl.cpp.

bool is_minimum_GLSL_version ( )

Helper function to enquire whether minimum GLSL version present.

Compares global variable set by glGetString(GL_SHADING_LANGUAGE_VERSION) against compile time MIN_REQUIRED_GLSL_VERSION.

true if GLSL support present is above the minimum version.

Definition at line 2064 of file gropengl.cpp.

int opengl_check_for_errors ( char *  err_at)

Definition at line 1252 of file gropengl.cpp.

void opengl_close ( )

Definition at line 1371 of file gropengl.cpp.

const char* opengl_error_string ( )

Definition at line 1239 of file gropengl.cpp.

void opengl_go_fullscreen ( )

Definition at line 110 of file gropengl.cpp.

void opengl_go_windowed ( )

Definition at line 184 of file gropengl.cpp.

int opengl_init_display_device ( )

Definition at line 1377 of file gropengl.cpp.

void opengl_minimize ( )

Definition at line 236 of file gropengl.cpp.

void opengl_save_mouse_area ( int  x,
int  y,
int  w,
int  h 

Definition at line 925 of file gropengl.cpp.

void opengl_set_vsync ( int  status)

Definition at line 1275 of file gropengl.cpp.

void opengl_setup_function_pointers ( )

Definition at line 1660 of file gropengl.cpp.

void opengl_setup_viewport ( )

Definition at line 1297 of file gropengl.cpp.

Variable Documentation

float FreeSpace_gamma

Definition at line 100 of file gropengl.cpp.

GLfloat GL_anisotropy

Definition at line 39 of file gropengltexture.cpp.

bool GL_initted = 0

Definition at line 60 of file gropengl.cpp.

int GL_version = 0

Definition at line 57 of file gropengl.cpp.

int GLSL_version = 0

Definition at line 58 of file gropengl.cpp.

int OGL_fogmode = 0

Definition at line 66 of file gropengl.cpp.

const char* Osreg_title

Definition at line 36 of file osregistry.cpp.

int Use_PBOs = 0

Definition at line 77 of file gropengl.cpp.

int Use_VBOs = 0

Definition at line 76 of file gropengl.cpp.