Open source remastering of the Freespace 2 engine
grstub.cpp File Reference
#include "anim/animplay.h"
#include "anim/packunpack.h"
#include "bmpman/bmpman.h"
#include "ddsutils/ddsutils.h"
#include "globalincs/systemvars.h"
#include "graphics/2d.h"
#include "graphics/grinternal.h"
#include "jpgutils/jpgutils.h"
#include "model/model.h"
#include "pcxutils/pcxutils.h"
#include "pngutils/pngutils.h"
#include "tgautils/tgautils.h"
#include "bmpman/bm_internal.h"

Go to the source code of this file.




uint gr_stub_lock ()
int gr_stub_create_buffer ()
bool gr_stub_pack_buffer (const int buffer_id, vertex_buffer *vb)
bool gr_stub_config_buffer (const int buffer_id, vertex_buffer *vb, bool update_ibuffer_only)
int gr_stub_make_light (light *light, int idx, int priority)
int gr_stub_preload (int bitmap_num, int is_aabitmap)
int gr_stub_save_screen ()
int gr_stub_tcache_set (int bitmap_id, int bitmap_type, float *u_scale, float *v_scale, int tex_unit=0)
int gr_stub_zbuffer_get ()
int gr_stub_zbuffer_set (int mode)
void gr_set_fill_mode_stub (int mode)
void gr_stub_aabitmap_ex (int x, int y, int w, int h, int sx, int sy, int resize_mode, bool mirror)
void gr_stub_aabitmap (int x, int y, int resize_mode, bool mirror)
void gr_stub_aaline (vertex *v1, vertex *v2)
void gr_stub_activate (int active)
void gr_stub_bitmap_ex (int x, int y, int w, int h, int sx, int sy, int resize_mode)
void gr_stub_bitmap (int x, int y)
void gr_stub_center_alpha (int type)
void gr_stub_set_thrust_scale (float scale)
void gr_stub_circle (int xc, int yc, int d, int resize_mode)
void gr_stub_unfilled_circle (int xc, int yc, int d, int resize_mode)
void gr_stub_cleanup (int minimize)
void gr_stub_clear ()
void gr_stub_cross_fade (int bmap1, int bmap2, int x1, int y1, int x2, int y2, float pct, int resize_mode)
void gr_stub_curve (int xc, int yc, int r, int direction, int resize_mode)
void gr_stub_destroy_buffer (int idx)
void gr_stub_destroy_light (int idx)
void gr_stub_end_clip_plane ()
void gr_stub_end_instance_matrix ()
void gr_stub_end_projection_matrix ()
void gr_stub_end_view_matrix ()
void gr_stub_flash_alpha (int r, int g, int b, int a)
void gr_stub_flash (int r, int g, int b)
void gr_stub_flip ()
void gr_stub_fog_set (int fog_mode, int r, int g, int b, float fog_near, float fog_far)
void gr_stub_free_screen (int id)
void gr_stub_get_region (int front, int w, int h, ubyte *data)
void gr_stub_gradient (int x1, int y1, int x2, int y2, int resize_mode)
void gr_stub_line (int x1, int y1, int x2, int y2, int resize_mode=GR_RESIZE_NONE)
void gr_stub_modify_light (light *light, int idx, int priority)
void gr_stub_pixel (int x, int y, int resize_mode)
void gr_stub_pop_scale_matrix ()
void gr_stub_pop_texture_matrix (int unit)
void gr_stub_preload_init ()
void gr_stub_print_screen (const char *filename)
void gr_stub_push_scale_matrix (const vec3d *scale_factor)
void gr_stub_push_texture_matrix (int unit)
void gr_stub_rect (int x, int y, int w, int h, int resize_mode)
void gr_stub_render_buffer (int start, const vertex_buffer *bufferp, int texi, int flags)
void gr_stub_reset_clip ()
void gr_stub_reset_lighting ()
void gr_stub_restore_screen (int id)
void gr_stub_save_mouse_area (int x, int y, int w, int h)
void gr_stub_scaler (vertex *va, vertex *vb, bool bw_bitmap)
void gr_stub_set_additive_tex_env ()
void gr_stub_set_buffer (int idx)
void gr_stub_update_buffer_object (int handle, uint size, void *data)
void gr_stub_update_transform_buffer (void *data, uint size)
void gr_stub_set_transform_buffer_offset (int offset)
int gr_stub_create_stream_buffer ()
void gr_stub_render_stream_buffer (int buffer_handle, int offset, int n_verts, int flags)
void gr_stub_set_clear_color (int r, int g, int b)
void gr_stub_set_clip (int x, int y, int w, int h, int resize_mode)
int gr_stub_set_cull (int cull)
int gr_stub_set_color_buffer (int mode)
void gr_stub_set_gamma (float gamma)
void gr_stub_set_lighting (bool set, bool state)
void gr_stub_set_light_factor (float factor)
void gr_stub_set_light (light *light)
void gr_stub_set_palette (const ubyte *new_palette, int is_alphacolor)
void gr_stub_set_projection_matrix (float fov, float aspect, float z_near, float z_far)
void gr_stub_set_tex_env_scale (float scale)
void gr_stub_set_texture_addressing (int mode)
void gr_stub_set_view_matrix (const vec3d *pos, const matrix *orient)
void gr_stub_start_clip_plane ()
void gr_stub_start_instance_angles (const vec3d *pos, const angles *rotation)
void gr_stub_start_instance_matrix (const vec3d *offset, const matrix *rotation)
void gr_stub_string (int sx, int sy, const char *s, int resize_mode=GR_RESIZE_NONE)
void gr_stub_stuff_fog_coord (vertex *v)
void gr_stub_stuff_secondary_color (vertex *v, ubyte fr, ubyte fg, ubyte fb)
void gr_stub_tmapper (int nverts, vertex **verts, uint flags)
void gr_stub_render (int nverts, vertex *verts, uint flags)
void gr_stub_render_effect (int nverts, vertex *verts, float *radius_list, uint flag)
void gr_stub_translate_texture_matrix (int unit, const vec3d *shift)
void gr_stub_zbias_stub (int bias)
void gr_stub_zbuffer_clear (int mode)
int gr_stub_stencil_set (int mode)
void gr_stub_stencil_clear ()
int gr_stub_alpha_mask_set (int mode, float alpha)
void gr_stub_post_process_set_effect (const char *name, int x)
void gr_stub_post_process_set_defaults ()
void gr_stub_post_process_save_zbuffer ()
void gr_stub_post_process_blur_shadow_map ()
void gr_stub_post_process_begin ()
void gr_stub_post_process_end ()
void gr_stub_scene_texture_begin ()
void gr_stub_scene_texture_end ()
void gr_stub_copy_effect_texture ()
void gr_stub_deferred_lighting_begin ()
void gr_stub_deferred_lighting_end ()
void gr_stub_deferred_lighting_finish ()
void gr_stub_set_ambient_light (int red, int green, int blue)
void gr_stub_set_texture_panning (float u, float v, bool enable)
void gr_stub_set_line_width (float width)
void gr_stub_draw_htl_line (const vec3d *start, const vec3d *end)
void gr_stub_draw_htl_sphere (float rad)
void gr_stub_draw_line_list (const colored_vector *lines, int num)
void gr_stub_clear_states ()
void gr_stub_update_texture (int bitmap_handle, int bpp, const ubyte *data, int width, int height)
void gr_stub_get_bitmap_from_texture (void *data_out, int bitmap_num)
int gr_stub_bm_make_render_target (int n, int *width, int *height, ubyte *bpp, int *mm_lvl, int flags)
int gr_stub_bm_set_render_target (int n, int face)
void gr_stub_bm_create (int n)
void gr_stub_bm_free_data (int n, bool release)
void gr_stub_bm_init (int n)
void gr_stub_bm_page_in_start ()
bool gr_stub_bm_data (int n, bitmap *bm)
int gr_stub_maybe_create_shader (shader_type shader_t, unsigned int flags)
void gr_stub_set_animated_effect (int effect, float timer)
void gr_stub_set_team_color (const team_color *colors)
void gr_stub_shadow_map_start (const matrix4 *shadow_view_matrix, const matrix *light_matrix)
void gr_stub_shadow_map_end ()
bool gr_stub_init ()

Macro Definition Documentation


Definition at line 16 of file grstub.cpp.

Function Documentation

void gr_set_fill_mode_stub ( int  mode)

Definition at line 73 of file grstub.cpp.

void gr_stub_aabitmap ( int  x,
int  y,
int  resize_mode,
bool  mirror 

Definition at line 81 of file grstub.cpp.

void gr_stub_aabitmap_ex ( int  x,
int  y,
int  w,
int  h,
int  sx,
int  sy,
int  resize_mode,
bool  mirror 

Definition at line 77 of file grstub.cpp.

void gr_stub_aaline ( vertex v1,
vertex v2 

Definition at line 85 of file grstub.cpp.

void gr_stub_activate ( int  active)

Definition at line 89 of file grstub.cpp.

int gr_stub_alpha_mask_set ( int  mode,
float  alpha 

Definition at line 392 of file grstub.cpp.

void gr_stub_bitmap ( int  x,
int  y 

Definition at line 97 of file grstub.cpp.

void gr_stub_bitmap_ex ( int  x,
int  y,
int  w,
int  h,
int  sx,
int  sy,
int  resize_mode 

Definition at line 93 of file grstub.cpp.

void gr_stub_bm_create ( int  n)

Definition at line 496 of file grstub.cpp.

bool gr_stub_bm_data ( int  n,
bitmap bm 

Definition at line 512 of file grstub.cpp.

void gr_stub_bm_free_data ( int  n,
bool  release 

Definition at line 500 of file grstub.cpp.

void gr_stub_bm_init ( int  n)

Definition at line 504 of file grstub.cpp.

int gr_stub_bm_make_render_target ( int  n,
int width,
int height,
ubyte bpp,
int mm_lvl,
int  flags 

Definition at line 486 of file grstub.cpp.

void gr_stub_bm_page_in_start ( )

Definition at line 508 of file grstub.cpp.

int gr_stub_bm_set_render_target ( int  n,
int  face 

Definition at line 491 of file grstub.cpp.

void gr_stub_center_alpha ( int  type)

Definition at line 101 of file grstub.cpp.

void gr_stub_circle ( int  xc,
int  yc,
int  d,
int  resize_mode 

Definition at line 109 of file grstub.cpp.

void gr_stub_cleanup ( int  minimize)

Definition at line 117 of file grstub.cpp.

void gr_stub_clear ( )

Definition at line 121 of file grstub.cpp.

void gr_stub_clear_states ( )

Definition at line 473 of file grstub.cpp.

bool gr_stub_config_buffer ( const int  buffer_id,
vertex_buffer vb,
bool  update_ibuffer_only 

Definition at line 38 of file grstub.cpp.

void gr_stub_copy_effect_texture ( )

Definition at line 433 of file grstub.cpp.

int gr_stub_create_buffer ( )

Definition at line 26 of file grstub.cpp.

int gr_stub_create_stream_buffer ( )

Definition at line 272 of file grstub.cpp.

void gr_stub_cross_fade ( int  bmap1,
int  bmap2,
int  x1,
int  y1,
int  x2,
int  y2,
float  pct,
int  resize_mode 

Definition at line 125 of file grstub.cpp.

void gr_stub_curve ( int  xc,
int  yc,
int  r,
int  direction,
int  resize_mode 

Definition at line 129 of file grstub.cpp.

void gr_stub_deferred_lighting_begin ( )

Definition at line 437 of file grstub.cpp.

void gr_stub_deferred_lighting_end ( )

Definition at line 441 of file grstub.cpp.

void gr_stub_deferred_lighting_finish ( )

Definition at line 445 of file grstub.cpp.

void gr_stub_destroy_buffer ( int  idx)

Definition at line 133 of file grstub.cpp.

void gr_stub_destroy_light ( int  idx)

Definition at line 137 of file grstub.cpp.

void gr_stub_draw_htl_line ( const vec3d start,
const vec3d end 

Definition at line 461 of file grstub.cpp.

void gr_stub_draw_htl_sphere ( float  rad)

Definition at line 465 of file grstub.cpp.

void gr_stub_draw_line_list ( const colored_vector lines,
int  num 

Definition at line 469 of file grstub.cpp.

void gr_stub_end_clip_plane ( )

Definition at line 141 of file grstub.cpp.

void gr_stub_end_instance_matrix ( )

Definition at line 145 of file grstub.cpp.

void gr_stub_end_projection_matrix ( )

Definition at line 149 of file grstub.cpp.

void gr_stub_end_view_matrix ( )

Definition at line 153 of file grstub.cpp.

void gr_stub_flash ( int  r,
int  g,
int  b 

Definition at line 161 of file grstub.cpp.

void gr_stub_flash_alpha ( int  r,
int  g,
int  b,
int  a 

Definition at line 157 of file grstub.cpp.

void gr_stub_flip ( )

Definition at line 165 of file grstub.cpp.

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

Definition at line 169 of file grstub.cpp.

void gr_stub_free_screen ( int  id)

Definition at line 173 of file grstub.cpp.

void gr_stub_get_bitmap_from_texture ( void data_out,
int  bitmap_num 

Definition at line 481 of file grstub.cpp.

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

Definition at line 177 of file grstub.cpp.

void gr_stub_gradient ( int  x1,
int  y1,
int  x2,
int  y2,
int  resize_mode 

Definition at line 181 of file grstub.cpp.

bool gr_stub_init ( )

Definition at line 537 of file grstub.cpp.

void gr_stub_line ( int  x1,
int  y1,
int  x2,
int  y2,
int  resize_mode = GR_RESIZE_NONE 

Definition at line 185 of file grstub.cpp.

uint gr_stub_lock ( )

Definition at line 20 of file grstub.cpp.

int gr_stub_make_light ( light light,
int  idx,
int  priority 

Definition at line 43 of file grstub.cpp.

int gr_stub_maybe_create_shader ( shader_type  shader_t,
unsigned int  flags 

Definition at line 517 of file grstub.cpp.

void gr_stub_modify_light ( light light,
int  idx,
int  priority 

Definition at line 189 of file grstub.cpp.

bool gr_stub_pack_buffer ( const int  buffer_id,
vertex_buffer vb 

Definition at line 32 of file grstub.cpp.

void gr_stub_pixel ( int  x,
int  y,
int  resize_mode 

Definition at line 193 of file grstub.cpp.

void gr_stub_pop_scale_matrix ( )

Definition at line 197 of file grstub.cpp.

void gr_stub_pop_texture_matrix ( int  unit)

Definition at line 201 of file grstub.cpp.

void gr_stub_post_process_begin ( )

Definition at line 417 of file grstub.cpp.

void gr_stub_post_process_blur_shadow_map ( )

Definition at line 413 of file grstub.cpp.

void gr_stub_post_process_end ( )

Definition at line 421 of file grstub.cpp.

void gr_stub_post_process_save_zbuffer ( )

Definition at line 409 of file grstub.cpp.

void gr_stub_post_process_set_defaults ( )

Definition at line 405 of file grstub.cpp.

void gr_stub_post_process_set_effect ( const char *  name,
int  x 

Definition at line 401 of file grstub.cpp.

int gr_stub_preload ( int  bitmap_num,
int  is_aabitmap 

Definition at line 48 of file grstub.cpp.

void gr_stub_preload_init ( )

Definition at line 205 of file grstub.cpp.

void gr_stub_print_screen ( const char *  filename)

Definition at line 209 of file grstub.cpp.

void gr_stub_push_scale_matrix ( const vec3d scale_factor)

Definition at line 213 of file grstub.cpp.

void gr_stub_push_texture_matrix ( int  unit)

Definition at line 217 of file grstub.cpp.

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

Definition at line 221 of file grstub.cpp.

void gr_stub_render ( int  nverts,
vertex verts,
uint  flags 

Definition at line 363 of file grstub.cpp.

void gr_stub_render_buffer ( int  start,
const vertex_buffer bufferp,
int  texi,
int  flags 

Definition at line 225 of file grstub.cpp.

void gr_stub_render_effect ( int  nverts,
vertex verts,
float radius_list,
uint  flag 

Definition at line 367 of file grstub.cpp.

void gr_stub_render_stream_buffer ( int  buffer_handle,
int  offset,
int  n_verts,
int  flags 

Definition at line 277 of file grstub.cpp.

void gr_stub_reset_clip ( )

Definition at line 229 of file grstub.cpp.

void gr_stub_reset_lighting ( )

Definition at line 233 of file grstub.cpp.

void gr_stub_restore_screen ( int  id)

Definition at line 237 of file grstub.cpp.

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

Definition at line 241 of file grstub.cpp.

int gr_stub_save_screen ( )

Definition at line 53 of file grstub.cpp.

void gr_stub_scaler ( vertex va,
vertex vb,
bool  bw_bitmap 

Definition at line 245 of file grstub.cpp.

void gr_stub_scene_texture_begin ( )

Definition at line 425 of file grstub.cpp.

void gr_stub_scene_texture_end ( )

Definition at line 429 of file grstub.cpp.

void gr_stub_set_additive_tex_env ( )

Definition at line 249 of file grstub.cpp.

void gr_stub_set_ambient_light ( int  red,
int  green,
int  blue 

Definition at line 449 of file grstub.cpp.

void gr_stub_set_animated_effect ( int  effect,
float  timer 

Definition at line 521 of file grstub.cpp.

void gr_stub_set_buffer ( int  idx)

Definition at line 253 of file grstub.cpp.

void gr_stub_set_clear_color ( int  r,
int  g,
int  b 

Definition at line 281 of file grstub.cpp.

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

Definition at line 285 of file grstub.cpp.

int gr_stub_set_color_buffer ( int  mode)

Definition at line 294 of file grstub.cpp.

int gr_stub_set_cull ( int  cull)

Definition at line 289 of file grstub.cpp.

void gr_stub_set_gamma ( float  gamma)

Definition at line 299 of file grstub.cpp.

void gr_stub_set_light ( light light)

Definition at line 311 of file grstub.cpp.

void gr_stub_set_light_factor ( float  factor)

Definition at line 307 of file grstub.cpp.

void gr_stub_set_lighting ( bool  set,
bool  state 

Definition at line 303 of file grstub.cpp.

void gr_stub_set_line_width ( float  width)

Definition at line 457 of file grstub.cpp.

void gr_stub_set_palette ( const ubyte new_palette,
int  is_alphacolor 

Definition at line 315 of file grstub.cpp.

void gr_stub_set_projection_matrix ( float  fov,
float  aspect,
float  z_near,
float  z_far 

Definition at line 319 of file grstub.cpp.

void gr_stub_set_team_color ( const team_color colors)

Definition at line 526 of file grstub.cpp.

void gr_stub_set_tex_env_scale ( float  scale)

Definition at line 323 of file grstub.cpp.

void gr_stub_set_texture_addressing ( int  mode)

Definition at line 327 of file grstub.cpp.

void gr_stub_set_texture_panning ( float  u,
float  v,
bool  enable 

Definition at line 453 of file grstub.cpp.

void gr_stub_set_thrust_scale ( float  scale)

Definition at line 105 of file grstub.cpp.

void gr_stub_set_transform_buffer_offset ( int  offset)

Definition at line 267 of file grstub.cpp.

void gr_stub_set_view_matrix ( const vec3d pos,
const matrix orient 

Definition at line 331 of file grstub.cpp.

void gr_stub_shadow_map_end ( )

Definition at line 533 of file grstub.cpp.

void gr_stub_shadow_map_start ( const matrix4 shadow_view_matrix,
const matrix light_matrix 

Definition at line 529 of file grstub.cpp.

void gr_stub_start_clip_plane ( )

Definition at line 335 of file grstub.cpp.

void gr_stub_start_instance_angles ( const vec3d pos,
const angles rotation 

Definition at line 339 of file grstub.cpp.

void gr_stub_start_instance_matrix ( const vec3d offset,
const matrix rotation 

Definition at line 343 of file grstub.cpp.

void gr_stub_stencil_clear ( )

Definition at line 388 of file grstub.cpp.

int gr_stub_stencil_set ( int  mode)

Definition at line 383 of file grstub.cpp.

void gr_stub_string ( int  sx,
int  sy,
const char *  s,
int  resize_mode = GR_RESIZE_NONE 

Definition at line 347 of file grstub.cpp.

void gr_stub_stuff_fog_coord ( vertex v)

Definition at line 351 of file grstub.cpp.

void gr_stub_stuff_secondary_color ( vertex v,
ubyte  fr,
ubyte  fg,
ubyte  fb 

Definition at line 355 of file grstub.cpp.

int gr_stub_tcache_set ( int  bitmap_id,
int  bitmap_type,
float u_scale,
float v_scale,
int  tex_unit = 0 

Definition at line 58 of file grstub.cpp.

void gr_stub_tmapper ( int  nverts,
vertex **  verts,
uint  flags 

Definition at line 359 of file grstub.cpp.

void gr_stub_translate_texture_matrix ( int  unit,
const vec3d shift 

Definition at line 371 of file grstub.cpp.

void gr_stub_unfilled_circle ( int  xc,
int  yc,
int  d,
int  resize_mode 

Definition at line 113 of file grstub.cpp.

void gr_stub_update_buffer_object ( int  handle,
uint  size,
void data 

Definition at line 257 of file grstub.cpp.

void gr_stub_update_texture ( int  bitmap_handle,
int  bpp,
const ubyte data,
int  width,
int  height 

Definition at line 477 of file grstub.cpp.

void gr_stub_update_transform_buffer ( void data,
uint  size 

Definition at line 262 of file grstub.cpp.

void gr_stub_zbias_stub ( int  bias)

Definition at line 375 of file grstub.cpp.

void gr_stub_zbuffer_clear ( int  mode)

Definition at line 379 of file grstub.cpp.

int gr_stub_zbuffer_get ( )

Definition at line 63 of file grstub.cpp.

int gr_stub_zbuffer_set ( int  mode)

Definition at line 68 of file grstub.cpp.