UFO: Alien Invasion
Loading...
Searching...
No Matches
cl_video.cpp File Reference

Shared client functions for windowed and fullscreen graphics interface module. More...

#include "cl_video.h"
#include "client.h"
#include "battlescape/cl_view.h"
#include "renderer/r_main.h"
#include "renderer/r_sdl.h"
#include "ui/ui_main.h"
#include "cgame/cl_game.h"
Include dependency graph for cl_video.cpp:

Go to the source code of this file.

Functions

int VID_GetModeNums (void)
 Returns the amount of available video modes.
bool VID_GetModeInfo (int modeIndex, vidmode_t *modeInfo)
static void VID_Restart_f (void)
 Perform a renderer restart.
static bool CL_CvarCheckVidGamma (cvar_t *cvar)
static bool CL_CvarCheckVidMode (cvar_t *cvar)
void VID_Minimize (void)
void VID_Init (void)

Variables

viddef_t viddef
cvar_tvid_stretch
cvar_tvid_fullscreen
cvar_tvid_mode
cvar_tvid_grabmouse
cvar_tvid_gamma
cvar_tvid_ignoregamma
static cvar_tvid_left
static cvar_tvid_top
static cvar_tvid_width
static cvar_tvid_height
static const vidmode_t vid_modes []
 All possible video modes.

Detailed Description

Shared client functions for windowed and fullscreen graphics interface module.

Definition in file cl_video.cpp.

Function Documentation

◆ CL_CvarCheckVidGamma()

bool CL_CvarCheckVidGamma ( cvar_t * cvar)
static

Definition at line 140 of file cl_video.cpp.

References Cvar_AssertValue().

Referenced by VID_Init().

◆ CL_CvarCheckVidMode()

bool CL_CvarCheckVidMode ( cvar_t * cvar)
static

Definition at line 145 of file cl_video.cpp.

References Cvar_AssertValue(), and VID_GetModeNums().

Referenced by VID_Init().

◆ VID_GetModeInfo()

bool VID_GetModeInfo ( int modeIndex,
vidmode_t * modeInfo )

◆ VID_GetModeNums()

int VID_GetModeNums ( void )

Returns the amount of available video modes.

Definition at line 84 of file cl_video.cpp.

References lengthof, r_sdl_config, and vid_modes.

Referenced by CL_CvarCheckVidMode(), CL_VideoInitMenu(), and VID_GetModeInfo().

◆ VID_Init()

◆ VID_Minimize()

void VID_Minimize ( void )

Definition at line 150 of file cl_video.cpp.

References cls.

Referenced by CL_OpenURL_f(), and VID_Init().

◆ VID_Restart_f()

void VID_Restart_f ( void )
static

Perform a renderer restart.

Todo
only reload the skins, not all models
Todo
going back into the map isn't working as long as GAME_ReloadMode is called

Definition at line 123 of file cl_video.cpp.

References CL_ViewPrecacheModels(), Com_Printf(), GAME_ReloadMode(), R_Init(), R_Shutdown(), refdef, and UI_Reinit().

Referenced by VID_Init().

Variable Documentation

◆ vid_fullscreen

cvar_t* vid_fullscreen

Definition at line 37 of file cl_video.cpp.

Referenced by IN_Frame(), R_SetMode(), R_UpdateVidDef(), and VID_Init().

◆ vid_gamma

cvar_t* vid_gamma

Definition at line 40 of file cl_video.cpp.

Referenced by R_EndFrame(), and VID_Init().

◆ vid_grabmouse

cvar_t* vid_grabmouse

Definition at line 39 of file cl_video.cpp.

Referenced by IN_Frame(), and VID_Init().

◆ vid_height

cvar_t* vid_height
static

Definition at line 46 of file cl_video.cpp.

Referenced by VID_GetModeInfo(), and VID_Init().

◆ vid_ignoregamma

cvar_t* vid_ignoregamma

Definition at line 41 of file cl_video.cpp.

Referenced by R_EndFrame(), and VID_Init().

◆ vid_left

cvar_t* vid_left
static

Definition at line 43 of file cl_video.cpp.

Referenced by VID_Init().

◆ vid_mode

cvar_t* vid_mode

Definition at line 38 of file cl_video.cpp.

Referenced by IN_Frame(), R_SetMode(), R_UpdateVidDef(), and VID_Init().

◆ vid_modes

const vidmode_t vid_modes[]
static
Initial value:
=
{
{ 320, 240, 0 },
{ 400, 300, 1 },
{ 512, 384, 2 },
{ 640, 480, 3 },
{ 800, 600, 4 },
{ 960, 720, 5 },
{ 1024, 768, 6 },
{ 1152, 864, 7 },
{ 1280, 1024, 8 },
{ 1600, 1200, 9 },
{ 2048, 1536, 10 },
{ 1024, 480, 11 },
{ 1152, 768, 12 },
{ 1280, 854, 13 },
{ 640, 400, 14 },
{ 800, 500, 15 },
{ 1024, 640, 16 },
{ 1280, 800, 17 },
{ 1680, 1050, 18 },
{ 1920, 1200, 19 },
{ 1400, 1050, 20 },
{ 1440, 900, 21 },
{ 1024, 600, 22 },
{ 800, 480, 23 },
{ 1920, 1080, 24 },
{ 1366, 768, 25 }
}

All possible video modes.

Definition at line 51 of file cl_video.cpp.

Referenced by VID_GetModeInfo(), and VID_GetModeNums().

◆ vid_stretch

cvar_t* vid_stretch

Definition at line 36 of file cl_video.cpp.

Referenced by R_SetMode(), R_UpdateVidDef(), and VID_Init().

◆ vid_top

cvar_t* vid_top
static

Definition at line 44 of file cl_video.cpp.

Referenced by VID_Init().

◆ vid_width

cvar_t* vid_width
static

Definition at line 45 of file cl_video.cpp.

Referenced by VID_GetModeInfo(), and VID_Init().

◆ viddef