DarkPlaces
Game engine based on the Quake 1 engine by id Software, developed by LadyHavoc
 
vid_shared.c File Reference
#include "quakedef.h"
#include "cdaudio.h"
#include "image.h"
+ Include dependency graph for vid_shared.c:

Go to the source code of this file.

Data Structures

struct  glfunction_t
 
struct  vidfallback_s
 

Macros

#define BOUNDCVAR(cvar, m1, m2)
 
#define GAMMACHECK(cache, value)
 

Functions

static void Force_CenterView_f (cmd_state_t *cmd)
 
qbool GL_CheckExtension (const char *name, const char *disableparm, int silent)
 
void GL_InitFunctions (void)
 
void GL_Setup (void)
 
 GLboolean (GLAPIENTRY *qglIsBuffer)(GLuint buffer)
 
 GLenum (GLAPIENTRY *qglCheckFramebufferStatus)(GLenum target)
 
 GLint (GLAPIENTRY *qglGetAttribLocation)(GLuint programObj
 
 GLuint (GLAPIENTRY *qglCreateProgram)(void)
 
 GLvoid (GLAPIENTRY *qglBindFramebuffer)(GLenum target
 
const GLubyte *GLAPIENTRYqglGetString (GLenum name)
 
const GLubyte *GLAPIENTRYqglGetStringi (GLenum name, GLuint index)
 
GLvoid *GLAPIENTRYqglMapBuffer (GLenum target, GLenum access)
 
void VID_ApplyGammaToColor (const float *rgb, float *out)
 applies current gamma settings to a color (0-1 range)
 
void VID_ApplyJoyState (vid_joystate_t *joystate)
 
void VID_BuildGammaTables (unsigned short *ramps, int rampsize)
 builds the current gamma tables into an array (needs 3*rampsize items)
 
void VID_ClearExtensions (void)
 
qbool VID_JoyBlockEmulatedKeys (int keycode)
 
float VID_JoyState_GetAxis (const vid_joystate_t *joystate, int axis, float fsensitivity, float deadzone)
 
static void VID_KeyEventForButton (qbool oldbutton, qbool newbutton, int key, double *timer)
 
static int VID_Mode (viddef_mode_t *mode)
 NULL mode means read it from the cvars.
 
void VID_Restart_f (cmd_state_t *cmd)
 
void VID_Shared_BuildJoyState_Begin (vid_joystate_t *joystate)
 
void VID_Shared_BuildJoyState_Finish (vid_joystate_t *joystate)
 
void VID_Shared_Init (void)
 
int VID_Shared_SetJoystick (int index)
 
size_t VID_SortModes (vid_mode_t *modes, size_t count, qbool usebpp, qbool userefreshrate, qbool useaspect)
 
static int VID_SortModes_Compare (const void *a_, const void *b_)
 
void VID_Start (void)
 
void VID_UpdateGamma (void)
 updates cachegamma variables and bumps vid_gammatables_serial if anything changed (ONLY to be called from VID_Finish!)
 
 void (GLAPIENTRY *qglActiveTexture)(GLenum texture)
 

Variables

GLclampf GLclampf GLclampf alpha
 
const GLuintarrays
 
GLuint attachedObj
 
GLenum attachment
 
GLclampf GLclampf blue
 
GLint GLenum GLsizei GLsizei GLint border
 
GLenum GLuint GLenum GLsizei const GLcharbuf
 
GLuint buffer
 
const GLuintbuffers
 
const GLenumbufs
 
GLsizei bufSize
 
static float cacheblack [3]
 
static float cachebrightness
 
static int cachecolorenable
 
static float cachecontrast
 
static float cachecontrastboost
 
static float cachegamma
 
static float cachegrey [3]
 
static float cachewhite [3]
 
GLenum GLenum GLsizei count
 
GLsizeiptr const GLvoiddata
 
GLint GLenum GLsizei GLsizei GLsizei depth
 
GLenum dfactor
 
GLenum GLenum GLenum dfactorAlpha
 
GLenum dfactorRGB
 
GLint GLint GLint GLint dstX0
 
GLint GLint GLint GLint GLint GLint dstX1
 
GLint GLint GLint GLint GLint dstY0
 
GLint GLint GLint GLint GLint GLint GLint dstY1
 
GLenum GLenum GLsizei const GLuint GLboolean enabled
 
GLclampd far_val
 
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
 
GLint first
 
GLint GLint GLint GLsizei GLsizei GLenum format
 
GLuint framebuffer
 
const GLuintframebuffers
 
static int gamma_forcenextframe = false
 
cvar_t gl_finish = {CF_CLIENT | CF_CLIENT, "gl_finish", "0", "make the cpu wait for the graphics processor at the end of each rendered frame (can help with strange input or video lag problems on some machines)"}
 
cvar_t gl_info_driver = {CF_CLIENT | CF_READONLY, "gl_info_driver", "", "name of driver library (opengl32.dll, libGL.so.1, or whatever)."}
 
cvar_t gl_info_extensions = {CF_CLIENT | CF_READONLY, "gl_info_extensions", "", "indicates extension list found by engine, space separated."}
 
cvar_t gl_info_renderer = {CF_CLIENT | CF_READONLY, "gl_info_renderer", "", "indicates graphics chip model and other information"}
 
cvar_t gl_info_vendor = {CF_CLIENT | CF_READONLY, "gl_info_vendor", "", "indicates brand of graphics chip"}
 
cvar_t gl_info_version = {CF_CLIENT | CF_READONLY, "gl_info_version", "", "indicates version of current renderer. begins with 1.0.0, 1.1.0, 1.2.0, 1.3.1 etc."}
 
const char * gl_renderer
 graphics chip model and other information
 
const char * gl_vendor
 brand of graphics chip
 
const char * gl_version
 begins with 1.0.0, 1.1.0, 1.2.0, 1.2.1, 1.3.0, 1.3.1, or 1.4.0
 
GLclampf green
 
GLenum GLsizei GLsizei height
 
GLenum GLuint id
 
GLsizei GLenum GLenum GLuintids
 
GLint GLenum GLsizei GLsizei GLint GLsizei imageSize
 
GLint voidimg
 
qbool in_client_mouse = true
 
float in_mouse_x
 
float in_mouse_y
 
float in_windowmouse_x
 
float in_windowmouse_y
 
GLuint index
 
GLsizei GLenum const GLvoidindices
 
GLsizei GLsizei GLcharinfoLog
 
GLint GLint internalFormat
 
GLenum internalformat
 
GLboolean invert
 
cvar_t joy_active = {CF_CLIENT | CF_READONLY, "joy_active", "0", "indicates that a joystick is active (detected and enabled)"}
 
cvar_t joy_axisforward = {CF_CLIENT, "joy_axisforward", "1", "which joystick axis to query for forward/backward movement"}
 
cvar_t joy_axiskeyevents = {CF_CLIENT | CF_ARCHIVE, "joy_axiskeyevents", "0", "generate uparrow/leftarrow etc. keyevents for joystick axes, use if your joystick driver is not generating them"}
 
cvar_t joy_axiskeyevents_deadzone = {CF_CLIENT | CF_ARCHIVE, "joy_axiskeyevents_deadzone", "0.5", "deadzone value for axes"}
 
cvar_t joy_axispitch = {CF_CLIENT, "joy_axispitch", "3", "which joystick axis to query for looking up/down"}
 
cvar_t joy_axisroll = {CF_CLIENT, "joy_axisroll", "-1", "which joystick axis to query for tilting head right/left"}
 
cvar_t joy_axisside = {CF_CLIENT, "joy_axisside", "0", "which joystick axis to query for right/left movement"}
 
cvar_t joy_axisup = {CF_CLIENT, "joy_axisup", "-1", "which joystick axis to query for up/down movement"}
 
cvar_t joy_axisyaw = {CF_CLIENT, "joy_axisyaw", "2", "which joystick axis to query for looking right/left"}
 
cvar_t joy_deadzoneforward = {CF_CLIENT, "joy_deadzoneforward", "0", "deadzone tolerance, suggested values are in the range 0 to 0.01"}
 
cvar_t joy_deadzonepitch = {CF_CLIENT, "joy_deadzonepitch", "0", "deadzone tolerance, suggested values are in the range 0 to 0.01"}
 
cvar_t joy_deadzoneroll = {CF_CLIENT, "joy_deadzoneroll", "0", "deadzone tolerance, suggested values are in the range 0 to 0.01"}
 
cvar_t joy_deadzoneside = {CF_CLIENT, "joy_deadzoneside", "0", "deadzone tolerance, suggested values are in the range 0 to 0.01"}
 
cvar_t joy_deadzoneup = {CF_CLIENT, "joy_deadzoneup", "0", "deadzone tolerance, suggested values are in the range 0 to 0.01"}
 
cvar_t joy_deadzoneyaw = {CF_CLIENT, "joy_deadzoneyaw", "0", "deadzone tolerance, suggested values are in the range 0 to 0.01"}
 
cvar_t joy_detected = {CF_CLIENT | CF_READONLY, "joy_detected", "0", "number of joysticks detected by engine"}
 
cvar_t joy_enable = {CF_CLIENT | CF_ARCHIVE, "joy_enable", "0", "enables joystick support"}
 
cvar_t joy_index = {CF_CLIENT, "joy_index", "0", "selects which joystick to use if you have multiple (0 uses the first controller, 1 uses the second, ...)"}
 
cvar_t joy_sensitivityforward = {CF_CLIENT, "joy_sensitivityforward", "-1", "movement multiplier"}
 
cvar_t joy_sensitivitypitch = {CF_CLIENT, "joy_sensitivitypitch", "1", "movement multiplier"}
 
cvar_t joy_sensitivityroll = {CF_CLIENT, "joy_sensitivityroll", "1", "movement multiplier"}
 
cvar_t joy_sensitivityside = {CF_CLIENT, "joy_sensitivityside", "1", "movement multiplier"}
 
cvar_t joy_sensitivityup = {CF_CLIENT, "joy_sensitivityup", "1", "movement multiplier"}
 
cvar_t joy_sensitivityyaw = {CF_CLIENT, "joy_sensitivityyaw", "-1", "movement multiplier"}
 
cvar_t joy_x360_axisforward = {CF_CLIENT, "joy_x360_axisforward", "1", "which joystick axis to query for forward/backward movement"}
 
cvar_t joy_x360_axispitch = {CF_CLIENT, "joy_x360_axispitch", "3", "which joystick axis to query for looking up/down"}
 
cvar_t joy_x360_axisroll = {CF_CLIENT, "joy_x360_axisroll", "-1", "which joystick axis to query for tilting head right/left"}
 
cvar_t joy_x360_axisside = {CF_CLIENT, "joy_x360_axisside", "0", "which joystick axis to query for right/left movement"}
 
cvar_t joy_x360_axisup = {CF_CLIENT, "joy_x360_axisup", "-1", "which joystick axis to query for up/down movement"}
 
cvar_t joy_x360_axisyaw = {CF_CLIENT, "joy_x360_axisyaw", "2", "which joystick axis to query for looking right/left"}
 
cvar_t joy_x360_deadzoneforward = {CF_CLIENT, "joy_x360_deadzoneforward", "0.266", "deadzone tolerance, suggested values are in the range 0 to 0.01"}
 
cvar_t joy_x360_deadzonepitch = {CF_CLIENT, "joy_x360_deadzonepitch", "0.266", "deadzone tolerance, suggested values are in the range 0 to 0.01"}
 
cvar_t joy_x360_deadzoneroll = {CF_CLIENT, "joy_x360_deadzoneroll", "0.266", "deadzone tolerance, suggested values are in the range 0 to 0.01"}
 
cvar_t joy_x360_deadzoneside = {CF_CLIENT, "joy_x360_deadzoneside", "0.266", "deadzone tolerance, suggested values are in the range 0 to 0.01"}
 
cvar_t joy_x360_deadzoneup = {CF_CLIENT, "joy_x360_deadzoneup", "0.266", "deadzone tolerance, suggested values are in the range 0 to 0.01"}
 
cvar_t joy_x360_deadzoneyaw = {CF_CLIENT, "joy_x360_deadzoneyaw", "0.266", "deadzone tolerance, suggested values are in the range 0 to 0.01"}
 
cvar_t joy_x360_sensitivityforward = {CF_CLIENT, "joy_x360_sensitivityforward", "1", "movement multiplier"}
 
cvar_t joy_x360_sensitivitypitch = {CF_CLIENT, "joy_x360_sensitivitypitch", "-1", "movement multiplier"}
 
cvar_t joy_x360_sensitivityroll = {CF_CLIENT, "joy_x360_sensitivityroll", "1", "movement multiplier"}
 
cvar_t joy_x360_sensitivityside = {CF_CLIENT, "joy_x360_sensitivityside", "1", "movement multiplier"}
 
cvar_t joy_x360_sensitivityup = {CF_CLIENT, "joy_x360_sensitivityup", "1", "movement multiplier"}
 
cvar_t joy_x360_sensitivityyaw = {CF_CLIENT, "joy_x360_sensitivityyaw", "-1", "movement multiplier"}
 
static int joybuttonkey [MAXJOYBUTTON][2]
 
static int joybuttonkey360 [][2]
 
GLenum GLenum GLuint GLint GLint layer
 
GLenum GLuint GLenum GLsizei length
 
GLsizei GLenum GLenum GLuint GLenum GLsizeilengths
 
GLenum GLenum GLuint GLint level
 
GLint location
 
GLint lod
 
GLint GLint GLint GLint GLint GLint GLint GLbitfield mask
 
GLsizei maxCount
 
GLuint GLsizei maxLength
 
GLsizei GLenum GLenum GLuint GLenum GLsizei GLcharmessageLog
 
GLenum mode
 
const GLcharname
 
GLint GLenum GLboolean normalized
 
GLuint obj
 
GLuint GLuint GLintptr offset
 
static glfunction_t openglfuncs []
 
GLint param
 
GLenum GLenum GLintparams
 
GLint GLenum GLenum GLvoidpixels
 
GLenum GLenum pname
 
GLenum GLvoid ** pointer
 
GLuint qid
 
GLint ref
 
GLuint renderbuffer
 
const GLuintrenderbuffers
 
GLenum GLenum renderbuffertarget
 
GLsizei samples
 
GLsizei GLenum GLenum GLuint GLenumseverities
 
GLenum GLenum severity
 
GLenum GLenum sfactorAlpha
 
GLuint GLuint GLintptr GLsizeiptr size
 
GLsizei GLsizei GLcharsource
 
GLsizei GLenumsources
 
GLint GLint srcX1
 
GLint srcY0
 
GLint GLint GLint srcY1
 
GLint GLenum GLboolean GLsizei stride
 
GLsizei const GLchar ** string
 
GLenum GLenum textarget
 
GLenum GLenum GLuint texture
 
const GLuinttextures
 
GLsizei GLboolean transpose
 
GLenum type
 
GLsizei GLenum GLenumtypes
 
GLuint GLuint uniformBlockBinding
 
GLuint uniformBlockIndex
 
const char * uniformBlockName
 
GLsizei uniformCount
 
GLuint uniformIndex
 
GLsizei const GLuintuniformIndices
 
GLuint GLsizei GLsizei char * uniformName
 
GLsizei const char ** uniformNames
 
GLfloat units
 
GLsizeiptr const GLvoid GLenum usage
 
const GLvoiduserParam
 
const GLdoublev
 
GLfloat v0
 
GLfloat GLfloat v1
 
GLfloat GLfloat GLfloat v2
 
GLfloat GLfloat GLfloat GLfloat v3
 
cvar_t v_brightness = {CF_CLIENT | CF_ARCHIVE, "v_brightness", "0", "brightness of black, useful for monitors that are too dark"}
 
cvar_t v_color_black_b = {CF_CLIENT | CF_ARCHIVE, "v_color_black_b", "0", "desired color of black"}
 
cvar_t v_color_black_g = {CF_CLIENT | CF_ARCHIVE, "v_color_black_g", "0", "desired color of black"}
 
cvar_t v_color_black_r = {CF_CLIENT | CF_ARCHIVE, "v_color_black_r", "0", "desired color of black"}
 
cvar_t v_color_enable = {CF_CLIENT | CF_ARCHIVE, "v_color_enable", "0", "enables black-grey-white color correction curve controls"}
 
cvar_t v_color_grey_b = {CF_CLIENT | CF_ARCHIVE, "v_color_grey_b", "0.5", "desired color of grey"}
 
cvar_t v_color_grey_g = {CF_CLIENT | CF_ARCHIVE, "v_color_grey_g", "0.5", "desired color of grey"}
 
cvar_t v_color_grey_r = {CF_CLIENT | CF_ARCHIVE, "v_color_grey_r", "0.5", "desired color of grey"}
 
cvar_t v_color_white_b = {CF_CLIENT | CF_ARCHIVE, "v_color_white_b", "1", "desired color of white"}
 
cvar_t v_color_white_g = {CF_CLIENT | CF_ARCHIVE, "v_color_white_g", "1", "desired color of white"}
 
cvar_t v_color_white_r = {CF_CLIENT | CF_ARCHIVE, "v_color_white_r", "1", "desired color of white"}
 
cvar_t v_contrast = {CF_CLIENT | CF_ARCHIVE, "v_contrast", "1", "brightness of white (values above 1 give a brighter image with increased color saturation, unlike v_gamma)"}
 
cvar_t v_contrastboost = {CF_CLIENT | CF_ARCHIVE, "v_contrastboost", "1", "by how much to multiply the contrast in dark areas (1 is no change)"}
 
cvar_t v_gamma = {CF_CLIENT | CF_ARCHIVE, "v_gamma", "1", "inverse gamma correction value, a brightness effect that does not affect white or black, and tends to make the image grey and dull"}
 
cvar_t v_glslgamma_2d = {CF_CLIENT | CF_ARCHIVE, "v_glslgamma_2d", "1", "applies GLSL gamma to 2d pictures (HUD, fonts)"}
 
cvar_t v_psycho = {CF_CLIENT, "v_psycho", "0", "easter egg - R.I.P. zinx http://obits.al.com/obituaries/birmingham/obituary.aspx?n=christopher-robert-lais&pid=186080667"}
 
GLsizei const GLfloatvalue
 
viddef_t vid
 global video state
 
qbool vid_activewindow = true
 
cvar_t vid_bitsperpixel = {CF_CLIENT | CF_READONLY, "vid_bitsperpixel", "32", "how many bits per pixel to render at (this is not currently configurable)"}
 
cvar_t vid_borderless = {CF_CLIENT | CF_ARCHIVE, "vid_borderless", "0", "make the window borderless by removing all window decorations. has no effect in fullscreen mode"}
 
qbool vid_commandlinecheck = true
 
cvar_t vid_desktopfullscreen = {CF_CLIENT | CF_ARCHIVE, "vid_desktopfullscreen", "1", "force desktop resolution and refresh rate (disable modesetting), also use some OS-dependent tricks for better fullscreen integration; disabling may reveal OS/driver/SDL bugs with multi-monitor configurations"}
 
cvar_t vid_display = {CF_CLIENT | CF_ARCHIVE, "vid_display", "0", "which monitor to render on, numbered from 0 (system default)" }
 
cvar_t vid_fullscreen = {CF_CLIENT | CF_ARCHIVE, "vid_fullscreen", "1", "use fullscreen (1) or windowed (0)"}
 
unsigned int vid_gammatables_serial = 0
 so other subsystems can poll if gamma parameters have changed; this starts with 0 and gets increased by 1 each time the gamma parameters get changed and VID_BuildGammaTables should be called again
 
qbool vid_gammatables_trivial = true
 this is set to true if all color control values are at default setting, and it therefore would make no sense to use the gamma table
 
cvar_t vid_grabkeyboard = {CF_CLIENT | CF_ARCHIVE, "vid_grabkeyboard", "0", "whether to grab the keyboard when mouse is active (prevents use of volume control keys, music player keys, etc on some keyboards)"}
 
cvar_t vid_height = {CF_CLIENT | CF_ARCHIVE, "vid_height", "480", "resolution"}
 
qbool vid_hidden = true
 
cvar_t vid_info_displaycount = {CF_CLIENT | CF_READONLY, "vid_info_displaycount", "1", "how many monitors are currently available, updated by hotplug events" }
 
double vid_joybuttontimer [MAXJOYBUTTON]
 
vid_joystate_t vid_joystate
 
cvar_t vid_minheight = {CF_CLIENT, "vid_minheight", "0", "minimum vid_height that is acceptable (to be set in default.cfg in mods)"}
 
cvar_t vid_minimize_on_focus_loss = {CF_CLIENT | CF_ARCHIVE, "vid_minimize_on_focus_loss", "0", "whether to minimize the fullscreen window if it loses focus (such as by alt+tab)"}
 
cvar_t vid_minwidth = {CF_CLIENT, "vid_minwidth", "0", "minimum vid_width that is acceptable (to be set in default.cfg in mods)"}
 
cvar_t vid_mouse = {CF_CLIENT | CF_ARCHIVE, "vid_mouse", "1", "whether to use the mouse in windowed mode (fullscreen always does)"}
 
cvar_t vid_mouse_clickthrough = {CF_CLIENT | CF_ARCHIVE, "vid_mouse_clickthrough", "0", "mouse behavior in windowed mode: 0 = click to focus, 1 = allow interaction even if the window is not focused (click-through behaviour, can be useful when using third-party game overlays)"}
 
qbool vid_opened
 
cvar_t vid_refreshrate = {CF_CLIENT | CF_ARCHIVE, "vid_refreshrate", "0", "refresh rate to use, in hz (higher values feel smoother, if supported by your monitor), 0 uses the default"}
 
cvar_t vid_resizable = {CF_CLIENT | CF_ARCHIVE, "vid_resizable", "1", "0: window not resizable, 1: resizable, 2: window can be resized but the framebuffer isn't adjusted" }
 
cvar_t vid_samples = {CF_CLIENT | CF_ARCHIVE, "vid_samples", "1", "how many anti-aliasing samples per pixel to request from the graphics driver (4 is recommended, 1 is faster)"}
 
cvar_t vid_sRGB = {CF_CLIENT | CF_ARCHIVE, "vid_sRGB", "0", "if hardware is capable, modify rendering to be gamma corrected for the sRGB color standard (computer monitors, TVs), recommended"}
 
cvar_t vid_sRGB_fallback = {CF_CLIENT | CF_ARCHIVE, "vid_sRGB_fallback", "0", "do an approximate sRGB fallback if not properly supported by hardware (2: also use the fallback if framebuffer is 8bit, 3: always use the fallback even if sRGB is supported)"}
 
cvar_t vid_stereobuffer = {CF_CLIENT | CF_ARCHIVE, "vid_stereobuffer", "0", "enables 'quad-buffered' stereo rendering for stereo shutterglasses, HMD (head mounted display) devices, or polarized stereo LCDs, if supported by your drivers"}
 
cvar_t vid_stick_mouse = {CF_CLIENT | CF_ARCHIVE, "vid_stick_mouse", "0", "have the mouse stuck in the center of the screen" }
 
cvar_t vid_touchscreen = {CF_CLIENT, "vid_touchscreen", "0", "Use touchscreen-style input (no mouse grab, track mouse motion only while button is down, screen areas for mimicing joystick axes and buttons"}
 
cvar_t vid_touchscreen_density = {CF_CLIENT, "vid_touchscreen_density", "2.0", "Standard quantized screen density multiplier (see Android documentation for DisplayMetrics), similar values are given on iPhoneOS"}
 
cvar_t vid_touchscreen_showkeyboard = {CF_CLIENT, "vid_touchscreen_showkeyboard", "0", "shows the platform's screen keyboard for text entry, can be set by csqc or menu qc if it wants to receive text input, does nothing if the platform has no screen keyboard"}
 
cvar_t vid_touchscreen_supportshowkeyboard = {CF_CLIENT | CF_READONLY, "vid_touchscreen_supportshowkeyboard", "0", "indicates if the platform supports a virtual keyboard"}
 
cvar_t vid_touchscreen_xdpi = {CF_CLIENT, "vid_touchscreen_xdpi", "300", "Horizontal DPI of the screen (only valid on Android currently)"}
 
cvar_t vid_touchscreen_ydpi = {CF_CLIENT, "vid_touchscreen_ydpi", "300", "Vertical DPI of the screen (only valid on Android currently)"}
 
cvar_t vid_vsync = {CF_CLIENT | CF_ARCHIVE, "vid_vsync", "0", "sync to vertical blank, prevents 'tearing' (seeing part of one frame and part of another on the screen at the same time) at the cost of latency, >= 1 always syncs and <= -1 is adaptive (stops syncing if the framerate drops, unsupported by some platforms), automatically disabled when doing timedemo benchmarks"}
 
cvar_t vid_width = {CF_CLIENT | CF_ARCHIVE, "vid_width", "640", "resolution"}
 
static struct vidfallback_s vidfallbacks []
 
GLubyte GLubyte GLubyte GLubyte w
 
GLenum GLsizei width
 
GLint GLenum GLint x
 
GLint GLint xoffset
 
GLint GLenum GLint GLint y
 
GLint GLint GLint yoffset
 
GLubyte GLubyte GLubyte z
 
GLenum zfail
 
GLint GLint GLint GLint zoffset
 
GLenum GLenum zpass
 

Macro Definition Documentation

◆ BOUNDCVAR

#define BOUNDCVAR ( cvar,
m1,
m2 )
Value:
c = &(cvar);f = bound(m1, c->value, m2);if (c->value != f) Cvar_SetValueQuick(c, f);
void Cvar_SetValueQuick(cvar_t *var, float value)
Definition cvar.c:473
#define bound(min, num, max)
Definition mathlib.h:34
float cvar(string name)
float f

Referenced by VID_UpdateGamma().

◆ GAMMACHECK

#define GAMMACHECK ( cache,
value )
Value:
if (cache != (value)) gamma_changed = true;cache = (value)
GLsizei const GLfloat * value
Definition vid_shared.c:345

Referenced by VID_UpdateGamma().

Function Documentation

◆ Force_CenterView_f()

static void Force_CenterView_f ( cmd_state_t * cmd)
static

Definition at line 1091 of file vid_shared.c.

1092{
1093 cl.viewangles[PITCH] = 0;
1094}
client_state_t cl
Definition cl_main.c:117
#define PITCH
Definition qtypes.h:16
vec3_t viewangles
Definition client.h:786

References cl, PITCH, and client_state_t::viewangles.

Referenced by VID_Shared_Init().

◆ GL_CheckExtension()

qbool GL_CheckExtension ( const char * name,
const char * disableparm,
int silent )

Definition at line 633 of file vid_shared.c.

634{
635 int failed = false;
636 const glfunction_t *func;
637 char extstr[MAX_INPUTLINE];
638
639 Con_DPrintf("checking for %s... ", name);
640
641 if (disableparm && (Sys_CheckParm(disableparm) || Sys_CheckParm("-safe")))
642 {
643 Con_DPrint("disabled by commandline\n");
644 return false;
645 }
646
648 {
649 Con_DPrint("not detected\n");
650 return false;
651 }
652
653#ifndef USE_GLES2
654 for (func = openglfuncs; func && func->name != NULL; func++)
655 {
656 if (!*func->funcvariable && !strcmp(name, func->extension))
657 {
658 if (!silent)
659 Con_DPrintf("%s is missing function \"%s\" - broken driver!\n", name, func->name);
660 failed = true;
661 }
662 }
663#endif //USE_GLES2
664 // delay the return so it prints all missing functions
665 if (failed)
666 return false;
667 // VorteX: add to found extension list
668 dpsnprintf(extstr, sizeof(extstr), "%s %s ", gl_info_extensions.string, name);
670
671 Con_DPrint("enabled\n");
672 return true;
673}
int dpsnprintf(char *buffer, size_t buffersize, const char *format,...)
Returns the number of printed characters, excluding the final '\0' or returns -1 if the buffer isn't ...
Definition common.c:997
void Con_DPrintf(const char *fmt,...)
A Con_Printf that only shows up if the "developer" cvar is set.
Definition console.c:1544
void Con_DPrint(const char *msg)
A Con_Print that only shows up if the "developer" cvar is set.
Definition console.c:1531
void Cvar_SetQuick(cvar_t *var, const char *value)
Definition cvar.c:436
#define MAX_INPUTLINE
maximum size of console commandline, QuakeC strings, and many other text processing buffers
Definition qdefs.h:94
#define NULL
Definition qtypes.h:12
const char * string
Definition cvar.h:71
const char * name
Definition vid_shared.c:413
const char * extension
Definition vid_shared.c:412
void ** funcvariable
Definition vid_shared.c:414
int Sys_CheckParm(const char *parm)
Definition sys_shared.c:327
qbool GL_ExtensionSupported(const char *name)
Definition vid_null.c:67
const GLchar * name
Definition vid_shared.c:205
cvar_t gl_info_extensions
Definition vid_shared.c:131
static glfunction_t openglfuncs[]
Definition vid_shared.c:420

References Con_DPrint(), Con_DPrintf(), Cvar_SetQuick(), dpsnprintf(), glfunction_t::extension, glfunction_t::funcvariable, GL_ExtensionSupported(), gl_info_extensions, MAX_INPUTLINE, glfunction_t::name, name, NULL, openglfuncs, cvar_t::string, and Sys_CheckParm().

Referenced by GL_Setup().

◆ GL_InitFunctions()

void GL_InitFunctions ( void )

Definition at line 684 of file vid_shared.c.

685{
686#ifndef USE_GLES2
687 const glfunction_t *func;
688 qbool missingrequiredfuncs = false;
689 static char missingfuncs[16384];
690
691 // first fetch the function pointers for everything - after this we can begin making GL calls.
692 for (func = openglfuncs; func->name != NULL; func++)
693 *func->funcvariable = (void *)GL_GetProcAddress(func->name);
694
695 missingfuncs[0] = 0;
696 for (func = openglfuncs; func && func->name != NULL; func++)
697 {
698 if (!*func->funcvariable && !strcmp(func->extension, "core"))
699 {
700 Con_DPrintf("GL context is missing required function \"%s\"!\n", func->name);
701 missingrequiredfuncs = true;
702 dp_strlcat(missingfuncs, " ", sizeof(missingfuncs));
703 dp_strlcat(missingfuncs, func->name, sizeof(missingfuncs));
704 }
705 }
706
707 if (missingrequiredfuncs)
708 Sys_Error("OpenGL driver/hardware lacks required features:\n%s", missingfuncs);
709#endif
710}
#define dp_strlcat(dst, src, dsize)
Definition common.h:304
bool qbool
Definition qtypes.h:9
void Sys_Error(const char *error,...) DP_FUNC_PRINTF(1) DP_FUNC_NORETURN
Causes the entire program to exit ASAP.
Definition sys_shared.c:724
void * GL_GetProcAddress(const char *name)
Definition vid_null.c:45

References Con_DPrintf(), dp_strlcat, glfunction_t::extension, glfunction_t::funcvariable, GL_GetProcAddress(), glfunction_t::name, NULL, openglfuncs, and Sys_Error().

Referenced by VID_InitModeGL().

◆ GL_Setup()

void GL_Setup ( void )

Definition at line 712 of file vid_shared.c.

713{
714 char *s;
715 int j;
716 GLint numextensions = 0;
717 int majorv, minorv;
718
719 gl_renderer = (const char *)qglGetString(GL_RENDERER);
720 gl_vendor = (const char *)qglGetString(GL_VENDOR);
721 gl_version = (const char *)qglGetString(GL_VERSION);
722
723 Con_Printf("GL_VENDOR: %s\n", gl_vendor);
724 Con_Printf("GL_RENDERER: %s\n", gl_renderer);
725 Con_Printf("GL_VERSION: %s\n", gl_version);
726
727#ifndef USE_GLES2
728 qglGetIntegerv(GL_MAJOR_VERSION, &majorv);
729 qglGetIntegerv(GL_MINOR_VERSION, &minorv);
730 vid.support.glversion = 10 * majorv + minorv;
731 if (vid.support.glversion < 32)
732 // fallback, should never get here: GL context creation should have failed
733 Sys_Error("OpenGL driver/hardware supports version %i.%i but 3.2 is the minimum\n", majorv, minorv);
734
735 qglGetIntegerv(GL_NUM_EXTENSIONS, &numextensions);
736 Con_DPrint("GL_EXTENSIONS:\n");
737 for (j = 0; j < numextensions; j++)
738 {
739 const char *ext = (const char *)qglGetStringi(GL_EXTENSIONS, j);
740 Con_DPrintf(" %s", ext);
741 if(j && !(j % 3))
742 Con_DPrintf("\n");
743 }
744 Con_DPrint("\n");
745#endif //USE_GLES2
746
747 Con_DPrint("Checking OpenGL extensions...\n");
748
749 // detect what GLSL version is available, to enable features like higher quality reliefmapping
752 if (s)
753 vid.support.glshaderversion = (int)(atof(s) * 100.0f + 0.5f);
754 if (vid.support.glshaderversion < 100)
756 Con_Printf("Detected GLSL version %i\n", vid.support.glshaderversion);
757
758#ifdef USE_GLES2
759 // GLES devices in general do not like GL_BGRA, so use GL_RGBA
761#else
762 // GL drivers generally prefer GL_BGRA
764#endif
765
766 vid.support.amd_texture_texture4 = GL_CheckExtension("GL_AMD_texture_texture4", "-notexture4", false);
767 vid.support.arb_texture_gather = GL_CheckExtension("GL_ARB_texture_gather", "-notexturegather", false);
768 vid.support.ext_texture_compression_s3tc = GL_CheckExtension("GL_EXT_texture_compression_s3tc", "-nos3tc", false);
769 vid.support.ext_texture_filter_anisotropic = GL_CheckExtension("GL_EXT_texture_filter_anisotropic", "-noanisotropy", false);
770#ifndef USE_GLES2
771 vid.support.ext_texture_srgb = true; // GL3 core, but not GLES2
772#endif
773 vid.support.arb_debug_output = GL_CheckExtension("GL_ARB_debug_output", "-nogldebugoutput", false);
775
776// COMMANDLINEOPTION: GL: -noanisotropy disables GL_EXT_texture_filter_anisotropic (allows higher quality texturing)
777// COMMANDLINEOPTION: GL: -nos3tc disables GL_EXT_texture_compression_s3tc (which allows use of .dds texture caching)
778// COMMANDLINEOPTION: GL: -notexture4 disables GL_AMD_texture_texture4 (which provides fetch4 sampling)
779// COMMANDLINEOPTION: GL: -notexturegather disables GL_ARB_texture_gather (which provides fetch4 sampling)
780// COMMANDLINEOPTION: GL: -nogldebugoutput disables GL_ARB_debug_output (which provides the gl_debug feature, if enabled)
781
782#ifdef WIN32
783 // gl_texturecompression_color is somehow broken on AMD's Windows driver,
784 // see: https://gitlab.com/xonotic/darkplaces/-/issues/228
785 // HACK: force it off (less bad than adding hacky checks to the renderer)
786 if (strncmp(gl_renderer, "AMD Radeon", 10) == 0)
787 {
790 }
791#endif
792
793#ifdef GL_MAX_DRAW_BUFFERS
794 qglGetIntegerv(GL_MAX_DRAW_BUFFERS, (GLint*)&vid.maxdrawbuffers);
796#endif
799#ifdef GL_MAX_CUBE_MAP_TEXTURE_SIZE
800#ifdef USE_GLES2
801 if (GL_CheckExtension("GL_ARB_texture_cube_map", "-nocubemap", false))
802#endif
803 {
805 Con_DPrintf("GL_MAX_CUBE_MAP_TEXTURE_SIZE = %i\n", vid.maxtexturesize_cubemap);
806 }
808#endif
809#ifdef GL_MAX_3D_TEXTURE_SIZE
810#ifdef USE_GLES2
811 if (GL_CheckExtension("GL_EXT_texture3D", "-notexture3d", false)
812 || GL_CheckExtension("GL_OES_texture3D", "-notexture3d", false))
813#endif
814 {
816 Con_DPrintf("GL_MAX_3D_TEXTURE_SIZE = %i\n", vid.maxtexturesize_3d);
817 }
818#endif
820
821#ifdef USE_GLES2
822 Con_Print("Using GLES2 rendering path\n");
824 vid.sRGBcapable2D = false;
825 vid.sRGBcapable3D = false;
826#else
827 Con_Print("Using GL32 rendering path\n");
829 vid.sRGBcapable2D = false;
830 vid.sRGBcapable3D = true;
831 // enable multisample antialiasing if possible
832 vid.allowalphatocoverage = true; // but see below, it may get turned to false again if GL_SAMPLES is <= 1
833 {
834 int samples = 0;
835 qglGetIntegerv(GL_SAMPLES, &samples);
837 if (samples > 1)
838 qglEnable(GL_MULTISAMPLE);
839 else
841 }
842 // currently MSAA antialiasing is not implemented for fbo viewports, so we actually have to force this off anyway.
844#endif
846
847#ifdef GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT
850#endif
852}
#define CF_READONLY
cvar cannot be changed from the console or the command buffer, and is considered CF_PERSISTENT
Definition cmd.h:54
void Con_Print(const char *msg)
Prints to all appropriate console targets, and adds timestamps.
Definition console.c:1504
void Con_Printf(const char *fmt,...)
Prints to all appropriate console targets.
Definition console.c:1514
static int(ZEXPORT *qz_inflate)(z_stream *strm
cvar_t gl_texturecompression_color
Definition gl_textures.c:38
#define GL_MAX_TEXTURE_SIZE
Definition glquake.h:157
#define CHECKGLERROR
Definition glquake.h:1059
#define GL_SAMPLES
Definition glquake.h:554
#define GL_VERSION
Definition glquake.h:140
int GLint
Definition glquake.h:51
#define GL_MAJOR_VERSION
Definition glquake.h:1038
#define GL_BGRA
Definition glquake.h:547
#define GL_MAX_CUBE_MAP_TEXTURE_SIZE
Definition glquake.h:271
#define GL_MAX_DRAW_BUFFERS
Definition glquake.h:377
#define GL_MAX_3D_TEXTURE_SIZE
Definition glquake.h:257
#define GL_MULTISAMPLE
Definition glquake.h:549
#define GL_EXTENSIONS
Definition glquake.h:141
#define GL_SHADING_LANGUAGE_VERSION
Definition glquake.h:516
#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT
Definition glquake.h:200
#define GL_MINOR_VERSION
Definition glquake.h:1039
#define GL_RENDERER
Definition glquake.h:139
#define GL_VENDOR
Definition glquake.h:138
#define GL_NUM_EXTENSIONS
Definition glquake.h:1040
@ TEXTYPE_RGBA
Definition r_textures.h:51
unsigned flags
Definition cvar.h:67
int samples
Definition vid.h:65
qbool ext_texture_filter_anisotropic
Definition vid.h:49
qbool amd_texture_texture4
Definition vid.h:46
qbool arb_texture_gather
Definition vid.h:47
qbool ext_texture_compression_s3tc
Definition vid.h:48
qbool ext_texture_srgb
Definition vid.h:50
int glversion
this is at least 32
Definition vid.h:44
qbool arb_debug_output
Definition vid.h:51
int glshaderversion
this is at least 150 (GL 3.2)
Definition vid.h:45
unsigned int maxtexturesize_2d
Definition vid.h:83
int forcetextype
always use GL_BGRA for D3D, always use GL_RGBA for GLES, etc
Definition vid.h:91
unsigned int maxtexturesize_3d
Definition vid.h:84
unsigned int maxtexturesize_cubemap
Definition vid.h:85
renderpath_t renderpath
Definition vid.h:80
qbool sRGBcapable3D
whether 3D rendering can be sRGB corrected (renderpath)
Definition vid.h:78
unsigned int max_anisotropy
Definition vid.h:86
viddef_support_t support
Definition vid.h:89
viddef_mode_t mode
currently active video mode
Definition vid.h:73
qbool allowalphatocoverage
indicates the GL_AlphaToCoverage function works on this renderpath and framebuffer
Definition vid.h:81
unsigned int maxdrawbuffers
Definition vid.h:87
qbool sRGBcapable2D
whether 2D rendering can be sRGB corrected (renderpath)
Definition vid.h:77
@ RENDERPATH_GLES2
Definition vid.h:38
@ RENDERPATH_GL32
Definition vid.h:37
const char * gl_vendor
brand of graphics chip
Definition vid_shared.c:190
GLsizei samples
Definition vid_shared.c:227
const GLubyte *GLAPIENTRY * qglGetStringi(GLenum name, GLuint index)
const char * gl_version
begins with 1.0.0, 1.1.0, 1.2.0, 1.2.1, 1.3.0, 1.3.1, or 1.4.0
Definition vid_shared.c:194
const char * gl_renderer
graphics chip model and other information
Definition vid_shared.c:192
viddef_t vid
global video state
Definition vid_shared.c:64
const GLubyte *GLAPIENTRY * qglGetString(GLenum name)
qbool GL_CheckExtension(const char *name, const char *disableparm, int silent)
Definition vid_shared.c:633

References viddef_t::allowalphatocoverage, viddef_support_t::amd_texture_texture4, viddef_support_t::arb_debug_output, viddef_support_t::arb_texture_gather, CF_READONLY, CHECKGLERROR, Con_DPrint(), Con_DPrintf(), Con_Print(), Con_Printf(), Cvar_SetQuick(), viddef_support_t::ext_texture_compression_s3tc, viddef_support_t::ext_texture_filter_anisotropic, viddef_support_t::ext_texture_srgb, cvar_t::flags, viddef_t::forcetextype, GL_BGRA, GL_CheckExtension(), GL_EXTENSIONS, GL_MAJOR_VERSION, GL_MAX_3D_TEXTURE_SIZE, GL_MAX_CUBE_MAP_TEXTURE_SIZE, GL_MAX_DRAW_BUFFERS, GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, GL_MAX_TEXTURE_SIZE, GL_MINOR_VERSION, GL_MULTISAMPLE, GL_NUM_EXTENSIONS, GL_RENDERER, gl_renderer, GL_SAMPLES, GL_SHADING_LANGUAGE_VERSION, gl_texturecompression_color, GL_VENDOR, gl_vendor, GL_VERSION, gl_version, viddef_support_t::glshaderversion, viddef_support_t::glversion, int(), viddef_t::max_anisotropy, viddef_t::maxdrawbuffers, viddef_t::maxtexturesize_2d, viddef_t::maxtexturesize_3d, viddef_t::maxtexturesize_cubemap, viddef_t::mode, qglGetString(), qglGetStringi(), viddef_t::renderpath, RENDERPATH_GL32, RENDERPATH_GLES2, samples, viddef_mode_t::samples, viddef_t::sRGBcapable2D, viddef_t::sRGBcapable3D, viddef_t::support, Sys_Error(), TEXTYPE_RGBA, and vid.

Referenced by VID_InitModeGL().

◆ GLboolean()

GLboolean ( GLAPIENTRY * qglIsBuffer)

◆ GLenum()

GLenum ( GLAPIENTRY * qglCheckFramebufferStatus)

◆ GLint()

GLint ( GLAPIENTRY * qglGetAttribLocation)

◆ GLuint()

GLuint ( GLAPIENTRY * qglCreateProgram)

◆ GLvoid()

GLvoid ( GLAPIENTRY * qglBindFramebuffer)

◆ qglGetString()

const GLubyte *GLAPIENTRY * qglGetString ( GLenum name)

Referenced by GL_Setup().

◆ qglGetStringi()

const GLubyte *GLAPIENTRY * qglGetStringi ( GLenum name,
GLuint index )

Referenced by GL_Setup().

◆ qglMapBuffer()

GLvoid *GLAPIENTRY * qglMapBuffer ( GLenum target,
GLenum access )

◆ VID_ApplyGammaToColor()

void VID_ApplyGammaToColor ( const float * rgb,
float * out )

applies current gamma settings to a color (0-1 range)

Definition at line 1100 of file vid_shared.c.

1101{
1102 int i;
1103 if (cachecolorenable)
1104 {
1105 for (i = 0; i < 3; i++)
1106 out[i] = pow(cachecontrastboost * rgb[i] / ((cachecontrastboost - 1) * rgb[i] + 1), 1.0 / invpow(0.5, 1 - cachegrey[i])) * cachewhite[i] + cacheblack[i];
1107 }
1108 else
1109 {
1110 for (i = 0; i < 3; i++)
1112 }
1113}
#define invpow(base, number)
Definition mathlib.h:50
float pow(float a, float b)
int i
dp_FragColor rgb
static float cachewhite[3]
static int cachecolorenable
static float cachecontrast
static float cachegamma
static float cachegrey[3]
static float cacheblack[3]
static float cachecontrastboost
static float cachebrightness

References cacheblack, cachebrightness, cachecolorenable, cachecontrast, cachecontrastboost, cachegamma, cachegrey, cachewhite, i, invpow, pow(), and rgb.

Referenced by M_Options_ColorControl_Draw().

◆ VID_ApplyJoyState()

void VID_ApplyJoyState ( vid_joystate_t * joystate)

Definition at line 1013 of file vid_shared.c.

1014{
1015 int j;
1016 int c = joy_axiskeyevents.integer != 0;
1017 if (joystate->is360)
1018 {
1019#if 0
1020 // keystrokes (chatpad)
1021 // DOES NOT WORK - no driver support in xinput1_3.dll :(
1022 xinput_keystroke_t keystroke;
1023 while (qXInputGetKeystroke && qXInputGetKeystroke(XUSER_INDEX_ANY, 0, &keystroke) == S_OK)
1024 Con_Printf("XInput KeyStroke: VirtualKey %i, Unicode %i, Flags %x, UserIndex %i, HidCode %i\n", keystroke.VirtualKey, keystroke.Unicode, keystroke.Flags, keystroke.UserIndex, keystroke.HidCode);
1025#endif
1026
1027 // emit key events for buttons
1028 for (j = 0;j < (int)(sizeof(joybuttonkey360)/sizeof(joybuttonkey360[0]));j++)
1029 VID_KeyEventForButton(vid_joystate.button[j] != 0, joystate->button[j] != 0, joybuttonkey360[j][c], &vid_joybuttontimer[j]);
1030
1031 // axes
1037 //cl.viewangles[2] += VID_JoyState_GetAxis(joystate, joy_x360_axisroll.integer, joy_x360_sensitivityroll.value, joy_x360_deadzoneroll.value) * cl.realframetime * cl_rollspeed.value;
1038 }
1039 else
1040 {
1041 // emit key events for buttons
1042 for (j = 0;j < MAXJOYBUTTON;j++)
1043 VID_KeyEventForButton(vid_joystate.button[j] != 0, joystate->button[j] != 0, joybuttonkey[j][c], &vid_joybuttontimer[j]);
1044
1045 // axes
1051 //cl.viewangles[2] += VID_JoyState_GetAxis(joystate, joy_axisroll.integer, joy_sensitivityroll.value, joy_deadzoneroll.value) * cl.realframetime * cl_rollspeed.value;
1052 }
1053
1054 vid_joystate = *joystate;
1055}
cvar_t cl_yawspeed
Definition cl_input.c:372
cvar_t cl_sidespeed
Definition cl_input.c:367
cvar_t cl_pitchspeed
Definition cl_input.c:373
cvar_t cl_upspeed
Definition cl_input.c:364
cvar_t cl_forwardspeed
Definition cl_input.c:365
double realframetime
Definition client.h:871
usercmd_t cmd
Definition client.h:752
float value
Definition cvar.h:74
int integer
Definition cvar.h:73
float forwardmove
Definition protocol.h:380
float upmove
Definition protocol.h:382
float sidemove
Definition protocol.h:381
unsigned char button[MAXJOYBUTTON]
0 or 1
Definition vid.h:105
qbool is360
indicates this joystick is a Microsoft Xbox 360 Controller For Windows
Definition vid.h:106
#define MAXJOYBUTTON
Definition vid.h:101
cvar_t joy_axisside
Definition vid_shared.c:89
cvar_t joy_axisup
Definition vid_shared.c:90
cvar_t joy_sensitivityside
Definition vid_shared.c:101
cvar_t joy_x360_sensitivityup
Definition vid_shared.c:122
cvar_t joy_x360_sensitivitypitch
Definition vid_shared.c:123
cvar_t joy_deadzoneforward
Definition vid_shared.c:94
cvar_t joy_sensitivityforward
Definition vid_shared.c:100
static int joybuttonkey360[][2]
Definition vid_shared.c:984
cvar_t joy_sensitivitypitch
Definition vid_shared.c:103
cvar_t joy_x360_deadzoneup
Definition vid_shared.c:116
cvar_t joy_axispitch
Definition vid_shared.c:91
cvar_t joy_x360_axisup
Definition vid_shared.c:110
cvar_t joy_deadzoneup
Definition vid_shared.c:96
cvar_t joy_x360_deadzoneforward
Definition vid_shared.c:114
cvar_t joy_axiskeyevents
Definition vid_shared.c:106
vid_joystate_t vid_joystate
Definition vid_shared.c:79
cvar_t joy_x360_sensitivityforward
Definition vid_shared.c:120
cvar_t joy_x360_sensitivityyaw
Definition vid_shared.c:124
cvar_t joy_x360_axispitch
Definition vid_shared.c:111
cvar_t joy_x360_axisforward
Definition vid_shared.c:108
cvar_t joy_deadzoneyaw
Definition vid_shared.c:98
cvar_t joy_x360_deadzoneside
Definition vid_shared.c:115
cvar_t joy_sensitivityup
Definition vid_shared.c:102
cvar_t joy_deadzonepitch
Definition vid_shared.c:97
cvar_t joy_x360_deadzonepitch
Definition vid_shared.c:117
cvar_t joy_axisyaw
Definition vid_shared.c:92
cvar_t joy_x360_axisyaw
Definition vid_shared.c:112
cvar_t joy_deadzoneside
Definition vid_shared.c:95
cvar_t joy_x360_axisside
Definition vid_shared.c:109
cvar_t joy_x360_sensitivityside
Definition vid_shared.c:121
cvar_t joy_x360_deadzoneyaw
Definition vid_shared.c:118
cvar_t joy_axisforward
Definition vid_shared.c:88
static void VID_KeyEventForButton(qbool oldbutton, qbool newbutton, int key, double *timer)
Definition vid_shared.c:946
double vid_joybuttontimer[MAXJOYBUTTON]
cvar_t joy_sensitivityyaw
Definition vid_shared.c:104
static int joybuttonkey[MAXJOYBUTTON][2]
Definition vid_shared.c:977
float VID_JoyState_GetAxis(const vid_joystate_t *joystate, int axis, float fsensitivity, float deadzone)
Definition vid_shared.c:854

References vid_joystate_t::button, cl, cl_forwardspeed, cl_pitchspeed, cl_sidespeed, cl_upspeed, cl_yawspeed, client_state_t::cmd, Con_Printf(), usercmd_t::forwardmove, int(), cvar_t::integer, vid_joystate_t::is360, joy_axisforward, joy_axiskeyevents, joy_axispitch, joy_axisside, joy_axisup, joy_axisyaw, joy_deadzoneforward, joy_deadzonepitch, joy_deadzoneside, joy_deadzoneup, joy_deadzoneyaw, joy_sensitivityforward, joy_sensitivitypitch, joy_sensitivityside, joy_sensitivityup, joy_sensitivityyaw, joy_x360_axisforward, joy_x360_axispitch, joy_x360_axisside, joy_x360_axisup, joy_x360_axisyaw, joy_x360_deadzoneforward, joy_x360_deadzonepitch, joy_x360_deadzoneside, joy_x360_deadzoneup, joy_x360_deadzoneyaw, joy_x360_sensitivityforward, joy_x360_sensitivitypitch, joy_x360_sensitivityside, joy_x360_sensitivityup, joy_x360_sensitivityyaw, joybuttonkey, joybuttonkey360, MAXJOYBUTTON, client_state_t::realframetime, usercmd_t::sidemove, usercmd_t::upmove, cvar_t::value, vid_joybuttontimer, vid_joystate, VID_JoyState_GetAxis(), VID_KeyEventForButton(), and client_state_t::viewangles.

Referenced by IN_Move().

◆ VID_BuildGammaTables()

void VID_BuildGammaTables ( unsigned short * ramps,
int rampsize )

builds the current gamma tables into an array (needs 3*rampsize items)

Definition at line 1117 of file vid_shared.c.

1118{
1119 if (cachecolorenable)
1120 {
1121 BuildGammaTable16(1.0f, invpow(0.5, 1 - cachegrey[0]), cachewhite[0], cacheblack[0], cachecontrastboost, ramps, rampsize);
1122 BuildGammaTable16(1.0f, invpow(0.5, 1 - cachegrey[1]), cachewhite[1], cacheblack[1], cachecontrastboost, ramps + rampsize, rampsize);
1123 BuildGammaTable16(1.0f, invpow(0.5, 1 - cachegrey[2]), cachewhite[2], cacheblack[2], cachecontrastboost, ramps + rampsize*2, rampsize);
1124 }
1125 else
1126 {
1128 BuildGammaTable16(1.0f, cachegamma, cachecontrast, cachebrightness, cachecontrastboost, ramps + rampsize, rampsize);
1129 BuildGammaTable16(1.0f, cachegamma, cachecontrast, cachebrightness, cachecontrastboost, ramps + rampsize*2, rampsize);
1130 }
1131
1132 if(vid.sRGB2D || vid.sRGB3D)
1133 {
1134 int i;
1135 for(i = 0; i < 3*rampsize; ++i)
1136 ramps[i] = (int)floor(bound(0.0f, Image_sRGBFloatFromLinearFloat(ramps[i] / 65535.0f), 1.0f) * 65535.0f + 0.5f);
1137 }
1138
1139 // LadyHavoc: this code came from Ben Winslow and Zinx Verituse, I have
1140 // immensely butchered it to work with variable framerates and fit in with
1141 // the rest of darkplaces.
1142 //
1143 // R.I.P. zinx http://obits.al.com/obituaries/birmingham/obituary.aspx?n=christopher-robert-lais&pid=186080667
1144 if (v_psycho.integer)
1145 {
1146 int x, y;
1147 float t;
1148 static float n[3], nd[3], nt[3];
1149 static int init = true;
1150 unsigned short *ramp;
1151 gamma_forcenextframe = true;
1152 if (init)
1153 {
1154 init = false;
1155 for (x = 0;x < 3;x++)
1156 {
1157 n[x] = lhrandom(0, 1);
1158 nd[x] = (rand()&1)?-0.25:0.25;
1159 nt[x] = lhrandom(1, 8.2);
1160 }
1161 }
1162
1163 for (x = 0;x < 3;x++)
1164 {
1165 nt[x] -= cl.realframetime;
1166 if (nt[x] < 0)
1167 {
1168 nd[x] = -nd[x];
1169 nt[x] += lhrandom(1, 8.2);
1170 }
1171 n[x] += nd[x] * cl.realframetime;
1172 n[x] -= floor(n[x]);
1173 }
1174
1175 for (x = 0, ramp = ramps;x < 3;x++)
1176 for (y = 0, t = n[x] - 0.75f;y < rampsize;y++, t += 0.75f * (2.0f / rampsize))
1177 *ramp++ = (unsigned short)(cos(t*(M_PI*2.0)) * 32767.0f + 32767.0f);
1178 }
1179}
#define n(x, y)
#define Image_sRGBFloatFromLinearFloat(c)
Definition image.h:68
#define lhrandom(MIN, MAX)
LadyHavoc: this function never returns exactly MIN or exactly MAX, because of a QuakeC bug in id1 whe...
Definition mathlib.h:48
#define M_PI
Definition mathlib.h:28
float cos(float f)
float floor(float f)
void BuildGammaTable16(float prescale, float gamma, float scale, float base, float contrastboost, unsigned short *out, int rampsize)
Definition palette.c:240
qbool sRGB3D
whether 3D rendering is sRGB corrected (based on sRGBcapable3D)
Definition vid.h:76
qbool sRGB2D
whether 2D rendering is sRGB corrected (based on sRGBcapable2D)
Definition vid.h:75
static int gamma_forcenextframe
GLint GLenum GLint GLint y
Definition vid_shared.c:256
GLint GLenum GLint x
Definition vid_shared.c:256
cvar_t v_psycho
Definition vid_shared.c:187

References bound, BuildGammaTable16(), cacheblack, cachebrightness, cachecolorenable, cachecontrast, cachecontrastboost, cachegamma, cachegrey, cachewhite, cl, cos(), floor(), gamma_forcenextframe, i, Image_sRGBFloatFromLinearFloat, cvar_t::integer, invpow, lhrandom, M_PI, n, client_state_t::realframetime, viddef_t::sRGB2D, viddef_t::sRGB3D, v_psycho, vid, x, and y.

Referenced by R_UpdateVariables().

◆ VID_ClearExtensions()

void VID_ClearExtensions ( void )

Definition at line 675 of file vid_shared.c.

676{
677 // VorteX: reset extensions info cvar, it got filled by GL_CheckExtension
679
680 // clear the extension flags
681 memset(&vid.support, 0, sizeof(vid.support));
682}

References Cvar_SetQuick(), gl_info_extensions, viddef_t::support, and vid.

Referenced by VID_Mode().

◆ VID_JoyBlockEmulatedKeys()

qbool VID_JoyBlockEmulatedKeys ( int keycode)

Definition at line 864 of file vid_shared.c.

865{
866 int j;
867 vid_joystate_t joystate;
868
870 return false;
872 return false;
873 if (keycode != K_UPARROW && keycode != K_DOWNARROW && keycode != K_RIGHTARROW && keycode != K_LEFTARROW)
874 return false;
875
876 // block system-generated key events for arrow keys if we're emulating the arrow keys ourselves
877 VID_BuildJoyState(&joystate);
878 for (j = 32;j < 36;j++)
879 if (vid_joystate.button[j] || joystate.button[j])
880 return true;
881
882 return false;
883}
float K_UPARROW
Definition keycodes.qc:15
float K_DOWNARROW
Definition keycodes.qc:16
float K_RIGHTARROW
Definition keycodes.qc:18
float K_LEFTARROW
Definition keycodes.qc:17
void VID_BuildJoyState(vid_joystate_t *joystate)
Definition vid_null.c:54

References vid_joystate_t::button, cvar_t::integer, vid_joystate_t::is360, joy_axiskeyevents, K_DOWNARROW, K_LEFTARROW, K_RIGHTARROW, K_UPARROW, VID_BuildJoyState(), and vid_joystate.

Referenced by Sys_SDL_HandleEvents().

◆ VID_JoyState_GetAxis()

float VID_JoyState_GetAxis ( const vid_joystate_t * joystate,
int axis,
float fsensitivity,
float deadzone )

Definition at line 854 of file vid_shared.c.

855{
856 float value;
857 value = (axis >= 0 && axis < MAXJOYAXIS) ? joystate->axis[axis] : 0.0f;
858 value = value > deadzone ? (value - deadzone) : (value < -deadzone ? (value + deadzone) : 0.0f);
859 value *= deadzone > 0 ? (1.0f / (1.0f - deadzone)) : 1.0f;
860 value = bound(-1, value, 1);
861 return value * fsensitivity;
862}
float axis[MAXJOYAXIS]
-1 to +1
Definition vid.h:104
#define MAXJOYAXIS
Definition vid.h:99

References vid_joystate_t::axis, bound, MAXJOYAXIS, and value.

Referenced by VID_ApplyJoyState(), VID_BuildJoyState(), and VID_Shared_BuildJoyState_Finish().

◆ VID_KeyEventForButton()

static void VID_KeyEventForButton ( qbool oldbutton,
qbool newbutton,
int key,
double * timer )
static

Definition at line 946 of file vid_shared.c.

947{
948 if (oldbutton)
949 {
950 if (newbutton)
951 {
952 if (host.realtime >= *timer)
953 {
954 Key_Event(key, 0, true);
955 *timer = host.realtime + 0.1;
956 }
957 }
958 else
959 {
960 Key_Event(key, 0, false);
961 *timer = 0;
962 }
963 }
964 else
965 {
966 if (newbutton)
967 {
968 Key_Event(key, 0, true);
969 *timer = host.realtime + 0.5;
970 }
971 }
972}
host_static_t host
Definition host.c:41
void Key_Event(int key, int ascii, qbool down)
Definition keys.c:1836
double realtime
the accumulated mainloop time since application started (with filtering), without any slowmo or clamp...
Definition host.h:46

References host, Key_Event(), and host_static_t::realtime.

Referenced by VID_ApplyJoyState().

◆ VID_Mode()

static int VID_Mode ( viddef_mode_t * mode)
static

NULL mode means read it from the cvars.

Definition at line 1388 of file vid_shared.c.

1389{
1390 char vabuf[1024];
1391 viddef_mode_t _mode;
1392
1393 if (!mode)
1394 {
1395 mode = &_mode;
1396 memset(mode, 0, sizeof(*mode));
1397 mode->display = vid_display.integer;
1398 mode->fullscreen = vid_fullscreen.integer != 0;
1399 mode->desktopfullscreen = vid_desktopfullscreen.integer != 0;
1400 mode->width = vid_width.integer;
1401 mode->height = vid_height.integer;
1402 mode->bitsperpixel = vid_bitsperpixel.integer;
1403 mode->refreshrate = max(0, vid_refreshrate.integer);
1404 mode->stereobuffer = vid_stereobuffer.integer != 0;
1405 }
1408
1409 if (VID_InitMode(mode))
1410 {
1411 // bones_was_here: we no longer copy the (possibly modified) display mode to `vid` here
1412 // because complete modesetting failure isn't really what happens with SDL2.
1413 // Instead we update the active mode when we successfully apply settings,
1414 // if some can't be applied we still have a viable window.
1415 // Failure is still possible for other (non- display mode) reasons.
1418
1419 switch(vid.renderpath)
1420 {
1421 case RENDERPATH_GL32:
1422#ifdef GL_STEREO
1423 {
1424 GLboolean stereo;
1425 qglGetBooleanv(GL_STEREO, &stereo);
1426 vid.mode.stereobuffer = stereo != 0;
1427 }
1428#endif
1429 break;
1430 case RENDERPATH_GLES2:
1431 default:
1432 vid.mode.stereobuffer = false;
1433 break;
1434 }
1435
1436 if(
1437 (vid_sRGB_fallback.integer >= 3) // force fallback
1438 ||
1439 (vid_sRGB_fallback.integer >= 2 && // fallback if framebuffer is 8bit
1440 r_viewfbo.integer < 2)
1441 )
1442 vid.sRGB2D = vid.sRGB3D = false;
1443
1444 Con_Printf("Video Mode: %s%s %dx%d %dbpp%s%s on display %i\n",
1445 vid.mode.desktopfullscreen ? "desktop " : "",
1446 vid.mode.fullscreen ? "fullscreen" : "window",
1448 vid.mode.refreshrate ? va(vabuf, sizeof(vabuf), " %.2fhz", vid.mode.refreshrate) : "",
1449 vid.mode.stereobuffer ? " stereo" : "",
1450 vid.mode.display);
1451
1453 {
1456 }
1457
1458 return true;
1459 }
1460 else
1461 return false;
1462}
int cl_ignoremousemoves
Definition cl_input.c:474
char * va(char *buf, size_t buflen, const char *format,...)
Definition common.c:972
cvar_t r_viewfbo
Definition gl_rmain.c:160
unsigned char GLboolean
Definition glquake.h:46
#define GL_STEREO
Definition glquake.h:65
#define max(A, B)
Definition mathlib.h:38
qbool desktopfullscreen
whether the display hardware mode can be changed
Definition vid.h:59
qbool stereobuffer
Definition vid.h:64
float refreshrate
Definition vid.h:63
int width
Definition vid.h:60
int height
Definition vid.h:61
qbool fullscreen
Definition vid.h:58
int bitsperpixel
Definition vid.h:62
int display
Definition vid.h:57
qbool VID_InitMode(const viddef_mode_t *mode)
allocates and opens an appropriate OpenGL context (and its window)
Definition vid_null.c:40
cvar_t vid_refreshrate
Definition vid_shared.c:140
cvar_t vid_width
Definition vid_shared.c:136
cvar_t vid_sRGB_fallback
Definition vid_shared.c:158
GLenum mode
Definition vid_shared.c:323
cvar_t vid_stereobuffer
Definition vid_shared.c:141
cvar_t vid_display
Definition vid_shared.c:166
cvar_t vid_height
Definition vid_shared.c:137
float in_windowmouse_y
Definition vid_shared.c:71
float in_windowmouse_x
Definition vid_shared.c:71
cvar_t vid_sRGB
Definition vid_shared.c:157
void VID_ClearExtensions(void)
Definition vid_shared.c:675
cvar_t vid_desktopfullscreen
Definition vid_shared.c:165
cvar_t vid_bitsperpixel
Definition vid_shared.c:138
cvar_t vid_touchscreen
Definition vid_shared.c:160
cvar_t vid_fullscreen
Definition vid_shared.c:134

References viddef_mode_t::bitsperpixel, cl_ignoremousemoves, Con_Printf(), viddef_mode_t::desktopfullscreen, viddef_mode_t::display, viddef_mode_t::fullscreen, GL_STEREO, viddef_mode_t::height, in_windowmouse_x, in_windowmouse_y, cvar_t::integer, max, mode, viddef_t::mode, r_viewfbo, viddef_mode_t::refreshrate, viddef_t::renderpath, RENDERPATH_GL32, RENDERPATH_GLES2, viddef_t::sRGB2D, viddef_t::sRGB3D, viddef_t::sRGBcapable2D, viddef_t::sRGBcapable3D, viddef_mode_t::stereobuffer, va(), cvar_t::value, vid, vid_bitsperpixel, VID_ClearExtensions(), vid_desktopfullscreen, vid_display, vid_fullscreen, vid_height, VID_InitMode(), vid_refreshrate, vid_sRGB, vid_sRGB_fallback, vid_stereobuffer, vid_touchscreen, vid_width, and viddef_mode_t::width.

Referenced by VID_Restart_f(), and VID_Start().

◆ VID_Restart_f()

void VID_Restart_f ( cmd_state_t * cmd)

Definition at line 1467 of file vid_shared.c.

1468{
1469 char vabuf[1024];
1470 viddef_mode_t oldmode;
1471
1472 // don't crash if video hasn't started yet
1474 return;
1475
1476 oldmode = vid.mode;
1477
1478 Con_Printf("VID_Restart: changing from %s%s %dx%d %dbpp%s%s on display %i, to %s%s %dx%d %dbpp%s%s on display %i.\n",
1479 oldmode.desktopfullscreen ? "desktop " : "",
1480 oldmode.fullscreen ? "fullscreen" : "window",
1481 oldmode.width, oldmode.height, oldmode.bitsperpixel,
1482 oldmode.refreshrate ? va(vabuf, sizeof(vabuf), " %.2fhz", oldmode.refreshrate) : "",
1483 oldmode.stereobuffer ? " stereo" : "",
1484 oldmode.display,
1485 vid_desktopfullscreen.integer ? "desktop " : "",
1486 vid_fullscreen.integer ? "fullscreen" : "window",
1488 vid_fullscreen.integer && !vid_desktopfullscreen.integer && vid_refreshrate.integer ? va(vabuf, sizeof(vabuf), " %.2fhz", vid_refreshrate.value) : "",
1489 vid_stereobuffer.integer ? " stereo" : "",
1491
1494 VID_Shutdown();
1495 if (!VID_Mode(NULL))
1496 {
1497 Con_Print(CON_ERROR "Video mode change failed\n");
1498 if (!VID_Mode(&oldmode))
1499 Sys_Error("Unable to restore to last working video mode");
1500 else
1501 {
1510 }
1511 }
1514}
void SCR_DeferLoadingPlaque(qbool startup)
Definition cl_screen.c:1859
#define CON_ERROR
Definition console.h:102
void Key_ReleaseAll(void)
Definition keys.c:2075
void R_Modules_Shutdown(void)
Definition r_modules.c:67
void R_Modules_Start(void)
Definition r_modules.c:49
void VID_Shutdown(void)
Called at shutdown.
Definition vid_null.c:28
qbool vid_commandlinecheck
static int VID_Mode(viddef_mode_t *mode)
NULL mode means read it from the cvars.

References viddef_mode_t::bitsperpixel, CON_ERROR, Con_Print(), Con_Printf(), Cvar_SetValueQuick(), viddef_mode_t::desktopfullscreen, viddef_mode_t::display, viddef_mode_t::fullscreen, viddef_mode_t::height, cvar_t::integer, Key_ReleaseAll(), viddef_t::mode, NULL, R_Modules_Shutdown(), R_Modules_Start(), viddef_mode_t::refreshrate, SCR_DeferLoadingPlaque(), viddef_mode_t::stereobuffer, Sys_Error(), va(), cvar_t::value, vid, vid_bitsperpixel, vid_commandlinecheck, vid_desktopfullscreen, vid_display, vid_fullscreen, vid_height, VID_Mode(), vid_refreshrate, VID_Shutdown(), vid_stereobuffer, vid_width, and viddef_mode_t::width.

Referenced by VID_Shared_Init().

◆ VID_Shared_BuildJoyState_Begin()

void VID_Shared_BuildJoyState_Begin ( vid_joystate_t * joystate)

Definition at line 885 of file vid_shared.c.

886{
887#ifdef WIN32
888 xinput_state_t xinputstate;
889#endif
890 memset(joystate, 0, sizeof(*joystate));
891#ifdef WIN32
892 if (vid_xinputindex >= 0 && qXInputGetState && qXInputGetState(vid_xinputindex, &xinputstate) == S_OK)
893 {
894 joystate->is360 = true;
895 joystate->button[ 0] = (xinputstate.Gamepad.wButtons & XINPUT_GAMEPAD_DPAD_UP) != 0;
896 joystate->button[ 1] = (xinputstate.Gamepad.wButtons & XINPUT_GAMEPAD_DPAD_DOWN) != 0;
897 joystate->button[ 2] = (xinputstate.Gamepad.wButtons & XINPUT_GAMEPAD_DPAD_LEFT) != 0;
898 joystate->button[ 3] = (xinputstate.Gamepad.wButtons & XINPUT_GAMEPAD_DPAD_RIGHT) != 0;
899 joystate->button[ 4] = (xinputstate.Gamepad.wButtons & XINPUT_GAMEPAD_START) != 0;
900 joystate->button[ 5] = (xinputstate.Gamepad.wButtons & XINPUT_GAMEPAD_BACK) != 0;
901 joystate->button[ 6] = (xinputstate.Gamepad.wButtons & XINPUT_GAMEPAD_LEFT_THUMB) != 0;
902 joystate->button[ 7] = (xinputstate.Gamepad.wButtons & XINPUT_GAMEPAD_RIGHT_THUMB) != 0;
903 joystate->button[ 8] = (xinputstate.Gamepad.wButtons & XINPUT_GAMEPAD_LEFT_SHOULDER) != 0;
904 joystate->button[ 9] = (xinputstate.Gamepad.wButtons & XINPUT_GAMEPAD_RIGHT_SHOULDER) != 0;
905 joystate->button[10] = (xinputstate.Gamepad.wButtons & XINPUT_GAMEPAD_A) != 0;
906 joystate->button[11] = (xinputstate.Gamepad.wButtons & XINPUT_GAMEPAD_B) != 0;
907 joystate->button[12] = (xinputstate.Gamepad.wButtons & XINPUT_GAMEPAD_X) != 0;
908 joystate->button[13] = (xinputstate.Gamepad.wButtons & XINPUT_GAMEPAD_Y) != 0;
909 joystate->button[14] = xinputstate.Gamepad.bLeftTrigger >= XINPUT_GAMEPAD_TRIGGER_THRESHOLD;
910 joystate->button[15] = xinputstate.Gamepad.bRightTrigger >= XINPUT_GAMEPAD_TRIGGER_THRESHOLD;
911 joystate->button[16] = xinputstate.Gamepad.sThumbLY < -16384;
912 joystate->button[17] = xinputstate.Gamepad.sThumbLY > 16384;
913 joystate->button[18] = xinputstate.Gamepad.sThumbLX < -16384;
914 joystate->button[19] = xinputstate.Gamepad.sThumbLX > 16384;
915 joystate->button[20] = xinputstate.Gamepad.sThumbRY < -16384;
916 joystate->button[21] = xinputstate.Gamepad.sThumbRY > 16384;
917 joystate->button[22] = xinputstate.Gamepad.sThumbRX < -16384;
918 joystate->button[23] = xinputstate.Gamepad.sThumbRX > 16384;
919 joystate->axis[ 4] = xinputstate.Gamepad.bLeftTrigger * (1.0f / 255.0f);
920 joystate->axis[ 5] = xinputstate.Gamepad.bRightTrigger * (1.0f / 255.0f);
921 joystate->axis[ 0] = xinputstate.Gamepad.sThumbLX * (1.0f / 32767.0f);
922 joystate->axis[ 1] = xinputstate.Gamepad.sThumbLY * (1.0f / 32767.0f);
923 joystate->axis[ 2] = xinputstate.Gamepad.sThumbRX * (1.0f / 32767.0f);
924 joystate->axis[ 3] = xinputstate.Gamepad.sThumbRY * (1.0f / 32767.0f);
925 }
926#endif
927}

References vid_joystate_t::axis, vid_joystate_t::button, and vid_joystate_t::is360.

Referenced by VID_BuildJoyState().

◆ VID_Shared_BuildJoyState_Finish()

void VID_Shared_BuildJoyState_Finish ( vid_joystate_t * joystate)

Definition at line 929 of file vid_shared.c.

930{
931 float f, r;
932 if (joystate->is360)
933 return;
934 // emulate key events for thumbstick
937#if MAXJOYBUTTON != 36
938#error this code must be updated if MAXJOYBUTTON changes!
939#endif
940 joystate->button[32] = f > 0.0f;
941 joystate->button[33] = f < 0.0f;
942 joystate->button[34] = r > 0.0f;
943 joystate->button[35] = r < 0.0f;
944}
dp_FragColor r
cvar_t joy_axiskeyevents_deadzone
Definition vid_shared.c:107

References vid_joystate_t::button, f, cvar_t::integer, vid_joystate_t::is360, joy_axisforward, joy_axiskeyevents_deadzone, joy_axisside, joy_sensitivityforward, joy_sensitivityside, r, cvar_t::value, and VID_JoyState_GetAxis().

Referenced by VID_BuildJoyState().

◆ VID_Shared_Init()

void VID_Shared_Init ( void )

Definition at line 1273 of file vid_shared.c.

1274{
1284
1295
1297
1299
1324#ifdef WIN32
1325 Cvar_RegisterVariable(&vid_ignore_taskbar);
1326#endif
1332
1334#ifdef WIN32
1335 Cvar_RegisterVariable(&joy_xinputavailable);
1336#endif
1345 //Cvar_RegisterVariable(&joy_axisroll);
1351 //Cvar_RegisterVariable(&joy_deadzoneroll);
1357 //Cvar_RegisterVariable(&joy_sensitivityroll);
1365 //Cvar_RegisterVariable(&joy_x360_axisroll);
1371 //Cvar_RegisterVariable(&joy_x360_deadzoneroll);
1377 //Cvar_RegisterVariable(&joy_x360_sensitivityroll);
1378
1379#ifdef WIN32
1380 Sys_LoadDependency(xinputdllnames, &xinputdll_dll, xinputdllfuncs);
1381#endif
1382
1383 Cmd_AddCommand(CF_CLIENT, "force_centerview", Force_CenterView_f, "recenters view (stops looking up/down)");
1384 Cmd_AddCommand(CF_CLIENT, "vid_restart", VID_Restart_f, "restarts video system (closes and reopens the window, restarts renderer)");
1385}
void Cmd_AddCommand(unsigned flags, const char *cmd_name, xcommand_t function, const char *description)
called by the init functions of other parts of the program to register commands and functions to call...
Definition cmd.c:1661
#define CF_CLIENT
cvar/command that only the client can change/execute
Definition cmd.h:48
void Cvar_RegisterVariable(cvar_t *variable)
registers a cvar that already has the name, string, and optionally the archive elements set.
Definition cvar.c:599
qbool Sys_LoadDependency(const char **dllnames, dllhandle_t *handle, const dllfunction_t *fcts)
Definition sys_shared.c:131
cvar_t v_color_enable
Definition vid_shared.c:176
cvar_t vid_minimize_on_focus_loss
Definition vid_shared.c:152
cvar_t v_contrastboost
Definition vid_shared.c:175
cvar_t v_color_white_b
Definition vid_shared.c:185
cvar_t vid_minwidth
Definition vid_shared.c:154
cvar_t joy_active
Definition vid_shared.c:84
cvar_t vid_stick_mouse
Definition vid_shared.c:163
cvar_t gl_info_version
Definition vid_shared.c:130
cvar_t vid_vsync
Definition vid_shared.c:149
cvar_t joy_detected
Definition vid_shared.c:85
cvar_t vid_touchscreen_ydpi
Definition vid_shared.c:147
cvar_t v_color_grey_b
Definition vid_shared.c:182
static void Force_CenterView_f(cmd_state_t *cmd)
cvar_t v_gamma
Definition vid_shared.c:172
cvar_t vid_grabkeyboard
Definition vid_shared.c:153
cvar_t gl_info_renderer
Definition vid_shared.c:129
cvar_t vid_info_displaycount
Definition vid_shared.c:167
cvar_t v_glslgamma_2d
Definition vid_shared.c:186
cvar_t vid_touchscreen_xdpi
Definition vid_shared.c:146
cvar_t vid_borderless
Definition vid_shared.c:135
cvar_t vid_touchscreen_density
Definition vid_shared.c:145
cvar_t v_color_white_g
Definition vid_shared.c:184
cvar_t vid_touchscreen_showkeyboard
Definition vid_shared.c:161
cvar_t v_color_black_r
Definition vid_shared.c:177
cvar_t vid_mouse_clickthrough
Definition vid_shared.c:151
cvar_t v_color_black_b
Definition vid_shared.c:179
cvar_t gl_info_driver
Definition vid_shared.c:132
cvar_t joy_enable
Definition vid_shared.c:86
cvar_t v_color_black_g
Definition vid_shared.c:178
cvar_t vid_mouse
Definition vid_shared.c:150
cvar_t v_color_grey_g
Definition vid_shared.c:181
cvar_t vid_samples
Definition vid_shared.c:139
cvar_t joy_index
Definition vid_shared.c:87
cvar_t vid_resizable
Definition vid_shared.c:164
cvar_t v_brightness
Definition vid_shared.c:174
cvar_t v_color_white_r
Definition vid_shared.c:183
cvar_t gl_finish
Definition vid_shared.c:156
cvar_t vid_touchscreen_supportshowkeyboard
Definition vid_shared.c:162
cvar_t v_color_grey_r
Definition vid_shared.c:180
cvar_t vid_minheight
Definition vid_shared.c:155
cvar_t gl_info_vendor
Definition vid_shared.c:128
void VID_Restart_f(cmd_state_t *cmd)
cvar_t v_contrast
Definition vid_shared.c:173

References CF_CLIENT, Cmd_AddCommand(), Cvar_RegisterVariable(), Force_CenterView_f(), gl_finish, gl_info_driver, gl_info_extensions, gl_info_renderer, gl_info_vendor, gl_info_version, joy_active, joy_axisforward, joy_axiskeyevents, joy_axiskeyevents_deadzone, joy_axispitch, joy_axisside, joy_axisup, joy_axisyaw, joy_deadzoneforward, joy_deadzonepitch, joy_deadzoneside, joy_deadzoneup, joy_deadzoneyaw, joy_detected, joy_enable, joy_index, joy_sensitivityforward, joy_sensitivitypitch, joy_sensitivityside, joy_sensitivityup, joy_sensitivityyaw, joy_x360_axisforward, joy_x360_axispitch, joy_x360_axisside, joy_x360_axisup, joy_x360_axisyaw, joy_x360_deadzoneforward, joy_x360_deadzonepitch, joy_x360_deadzoneside, joy_x360_deadzoneup, joy_x360_deadzoneyaw, joy_x360_sensitivityforward, joy_x360_sensitivitypitch, joy_x360_sensitivityside, joy_x360_sensitivityup, joy_x360_sensitivityyaw, Sys_LoadDependency(), v_brightness, v_color_black_b, v_color_black_g, v_color_black_r, v_color_enable, v_color_grey_b, v_color_grey_g, v_color_grey_r, v_color_white_b, v_color_white_g, v_color_white_r, v_contrast, v_contrastboost, v_gamma, v_glslgamma_2d, v_psycho, vid_bitsperpixel, vid_borderless, vid_desktopfullscreen, vid_display, vid_fullscreen, vid_grabkeyboard, vid_height, vid_info_displaycount, vid_minheight, vid_minimize_on_focus_loss, vid_minwidth, vid_mouse, vid_mouse_clickthrough, vid_refreshrate, vid_resizable, VID_Restart_f(), vid_samples, vid_sRGB, vid_sRGB_fallback, vid_stereobuffer, vid_stick_mouse, vid_touchscreen, vid_touchscreen_density, vid_touchscreen_showkeyboard, vid_touchscreen_supportshowkeyboard, vid_touchscreen_xdpi, vid_touchscreen_ydpi, vid_vsync, and vid_width.

Referenced by CL_Init().

◆ VID_Shared_SetJoystick()

int VID_Shared_SetJoystick ( int index)

Definition at line 1057 of file vid_shared.c.

1058{
1059#ifdef WIN32
1060 int i;
1061 int xinputcount = 0;
1062 int xinputindex = -1;
1063 int xinputavailable = 0;
1064 xinput_state_t state;
1065 // detect available XInput controllers
1066 for (i = 0;i < 4;i++)
1067 {
1068 if (qXInputGetState && qXInputGetState(i, &state) == S_OK)
1069 {
1070 xinputavailable |= 1<<i;
1071 if (index == xinputcount)
1072 xinputindex = i;
1073 xinputcount++;
1074 }
1075 }
1076 if (joy_xinputavailable.integer != xinputavailable)
1077 Cvar_SetValueQuick(&joy_xinputavailable, xinputavailable);
1078 if (vid_xinputindex != xinputindex)
1079 {
1080 vid_xinputindex = xinputindex;
1081 if (xinputindex >= 0)
1082 Con_Printf("Joystick %i opened (XInput Device %i)\n", index, xinputindex);
1083 }
1084 return xinputcount;
1085#else
1086 return 0;
1087#endif
1088}
GLuint index
Definition vid_shared.c:234

References Con_Printf(), Cvar_SetValueQuick(), i, index, and cvar_t::integer.

Referenced by VID_EnableJoystick().

◆ VID_SortModes()

size_t VID_SortModes ( vid_mode_t * modes,
size_t count,
qbool usebpp,
qbool userefreshrate,
qbool useaspect )

Definition at line 1623 of file vid_shared.c.

1624{
1625 size_t i;
1626 if(count == 0)
1627 return 0;
1628 // 1. sort them
1629 qsort(modes, count, sizeof(*modes), VID_SortModes_Compare);
1630 // 2. remove duplicates
1631 for(i = 0; i < count; ++i)
1632 {
1633 if(modes[i].width && modes[i].height)
1634 {
1635 if(i == 0)
1636 continue;
1637 if(modes[i].width != modes[i-1].width)
1638 continue;
1639 if(modes[i].height != modes[i-1].height)
1640 continue;
1641 if(userefreshrate)
1642 if(modes[i].refreshrate != modes[i-1].refreshrate)
1643 continue;
1644 if(usebpp)
1645 if(modes[i].bpp != modes[i-1].bpp)
1646 continue;
1647 if(useaspect)
1648 if(modes[i].pixelheight_num * modes[i-1].pixelheight_denom != modes[i].pixelheight_denom * modes[i-1].pixelheight_num)
1649 continue;
1650 }
1651 // a dupe, or a bogus mode!
1652 if(i < count-1)
1653 memmove(&modes[i], &modes[i+1], sizeof(*modes) * (count-1 - i));
1654 --i; // check this index again, as mode i+1 is now here
1655 --count;
1656 }
1657 return count;
1658}
static glmode_t modes[6]
GLenum GLsizei width
Definition vid_shared.c:226
static int VID_SortModes_Compare(const void *a_, const void *b_)
GLenum GLsizei GLsizei height
Definition vid_shared.c:226
GLenum GLenum GLsizei count
Definition vid_shared.c:261

References count, height, i, modes, VID_SortModes_Compare(), and width.

Referenced by MR_Init().

◆ VID_SortModes_Compare()

static int VID_SortModes_Compare ( const void * a_,
const void * b_ )
static

Definition at line 1597 of file vid_shared.c.

1598{
1599 vid_mode_t *a = (vid_mode_t *) a_;
1600 vid_mode_t *b = (vid_mode_t *) b_;
1601 if(a->width > b->width)
1602 return +1;
1603 if(a->width < b->width)
1604 return -1;
1605 if(a->height > b->height)
1606 return +1;
1607 if(a->height < b->height)
1608 return -1;
1609 if(a->refreshrate > b->refreshrate)
1610 return +1;
1611 if(a->refreshrate < b->refreshrate)
1612 return -1;
1613 if(a->bpp > b->bpp)
1614 return +1;
1615 if(a->bpp < b->bpp)
1616 return -1;
1617 if(a->pixelheight_num * b->pixelheight_denom > a->pixelheight_denom * b->pixelheight_num)
1618 return +1;
1619 if(a->pixelheight_num * b->pixelheight_denom < a->pixelheight_denom * b->pixelheight_num)
1620 return -1;
1621 return 0;
1622}
dp_FragColor b
ret a

References a, and b.

Referenced by VID_SortModes().

◆ VID_Start()

void VID_Start ( void )

Definition at line 1533 of file vid_shared.c.

1534{
1535 int i = 0;
1536 int width, height, success;
1538 {
1539 // interpret command-line parameters
1540 vid_commandlinecheck = false;
1541// COMMANDLINEOPTION: Video: -window performs +vid_fullscreen 0
1542 if (Sys_CheckParm("-window") || Sys_CheckParm("-safe") || ((i = Sys_CheckParm("+vid_fullscreen")) != 0 && atoi(sys.argv[i+1]) == 0))
1544// COMMANDLINEOPTION: Video: -borderless performs +vid_borderless 1
1545 if (Sys_CheckParm("-borderless") || ((i = Sys_CheckParm("+vid_borderless")) != 0 && atoi(sys.argv[i+1]) == 1))
1546 {
1549 }
1550// COMMANDLINEOPTION: Video: -fullscreen performs +vid_fullscreen 1
1551 if (Sys_CheckParm("-fullscreen") || ((i = Sys_CheckParm("+vid_fullscreen")) != 0 && atoi(sys.argv[i+1]) == 1))
1553 width = 0;
1554 height = 0;
1555// COMMANDLINEOPTION: Video: -width <pixels> performs +vid_width <pixels> and also +vid_height <pixels*3/4> if only -width is specified (example: -width 1024 sets 1024x768 mode)
1556 if ((i = Sys_CheckParm("-width")) != 0 || ((i = Sys_CheckParm("+vid_width")) != 0))
1557 width = atoi(sys.argv[i+1]);
1558// COMMANDLINEOPTION: Video: -height <pixels> performs +vid_height <pixels> and also +vid_width <pixels*4/3> if only -height is specified (example: -height 768 sets 1024x768 mode)
1559 if ((i = Sys_CheckParm("-height")) != 0 || ((i = Sys_CheckParm("+vid_height")) != 0))
1560 height = atoi(sys.argv[i+1]);
1561 if (width == 0)
1562 width = height * 4 / 3;
1563 if (height == 0)
1564 height = width * 3 / 4;
1565 if (width)
1567 if (height)
1569// COMMANDLINEOPTION: Video: -density <multiplier> performs +vid_touchscreen_density <multiplier> (example -density 1 or -density 1.5)
1570 if ((i = Sys_CheckParm("-density")) != 0)
1572// COMMANDLINEOPTION: Video: -xdpi <dpi> performs +vid_touchscreen_xdpi <dpi> (example -xdpi 160 or -xdpi 320)
1573 if ((i = Sys_CheckParm("-touchscreen_xdpi")) != 0)
1575// COMMANDLINEOPTION: Video: -ydpi <dpi> performs +vid_touchscreen_ydpi <dpi> (example -ydpi 160 or -ydpi 320)
1576 if ((i = Sys_CheckParm("-touchscreen_ydpi")) != 0)
1578 }
1579
1580 success = VID_Mode(NULL);
1581 if (!success)
1582 {
1583 Con_Print(CON_WARN "Desired video mode fail, trying fallbacks...\n");
1584 for (i = 0; !success && vidfallbacks[i].cvar != NULL; i++)
1585 {
1587 success = VID_Mode(NULL);
1588 }
1589 if (!success)
1590 Sys_Error("Video modes failed");
1591 }
1592
1595}
#define CON_WARN
Definition console.h:101
const char ** argv
Definition sys.h:147
cvar_t * cvar
sys_t sys
Definition sys_shared.c:42
static struct vidfallback_s vidfallbacks[]

References sys_t::argv, Con_Print(), CON_WARN, cvar(), vidfallback_s::cvar, Cvar_SetQuick(), Cvar_SetValueQuick(), height, i, Key_ReleaseAll(), NULL, R_Modules_Start(), vidfallback_s::safevalue, sys, Sys_CheckParm(), Sys_Error(), vid_borderless, vid_commandlinecheck, vid_fullscreen, vid_height, VID_Mode(), vid_touchscreen_density, vid_touchscreen_xdpi, vid_touchscreen_ydpi, vid_width, vidfallbacks, and width.

Referenced by CL_StartVideo().

◆ VID_UpdateGamma()

void VID_UpdateGamma ( void )

updates cachegamma variables and bumps vid_gammatables_serial if anything changed (ONLY to be called from VID_Finish!)

Definition at line 1181 of file vid_shared.c.

1182{
1183 cvar_t *c;
1184 float f;
1185 qbool gamma_changed = false;
1186
1187#define BOUNDCVAR(cvar, m1, m2) c = &(cvar);f = bound(m1, c->value, m2);if (c->value != f) Cvar_SetValueQuick(c, f);
1188 BOUNDCVAR(v_gamma, 0.1, 5);
1189 BOUNDCVAR(v_contrast, 0.2, 5);
1190 BOUNDCVAR(v_brightness, -v_contrast.value * 0.8, 0.8);
1191 //BOUNDCVAR(v_contrastboost, 0.0625, 16);
1192 BOUNDCVAR(v_color_black_r, 0, 0.8);
1193 BOUNDCVAR(v_color_black_g, 0, 0.8);
1194 BOUNDCVAR(v_color_black_b, 0, 0.8);
1195 BOUNDCVAR(v_color_grey_r, 0, 0.95);
1196 BOUNDCVAR(v_color_grey_g, 0, 0.95);
1197 BOUNDCVAR(v_color_grey_b, 0, 0.95);
1201#undef BOUNDCVAR
1202
1203 // set vid_gammatables_trivial to true if the current settings would generate the identity gamma table
1205 if(v_psycho.integer == 0)
1206 if(v_contrastboost.value == 1)
1207 if(!vid.sRGB2D)
1208 if(!vid.sRGB3D)
1209 {
1211 {
1212 if(v_color_black_r.value == 0)
1213 if(v_color_black_g.value == 0)
1214 if(v_color_black_b.value == 0)
1215 if(fabs(v_color_grey_r.value - 0.5) < 1e-6)
1216 if(fabs(v_color_grey_g.value - 0.5) < 1e-6)
1217 if(fabs(v_color_grey_b.value - 0.5) < 1e-6)
1218 if(v_color_white_r.value == 1)
1219 if(v_color_white_g.value == 1)
1220 if(v_color_white_b.value == 1)
1222 }
1223 else
1224 {
1225 if(v_gamma.value == 1)
1226 if(v_contrast.value == 1)
1227 if(v_brightness.value == 0)
1229 }
1230 }
1231
1232 // if any gamma settings were changed, bump vid_gammatables_serial so we regenerate the gamma ramp texture
1233#define GAMMACHECK(cache, value) if (cache != (value)) gamma_changed = true;cache = (value)
1234 if(v_psycho.integer)
1235 gamma_changed = true;
1250
1251 if(gamma_changed)
1253#undef GAMMACHECK
1254}
float fabs(float f)
Definition cvar.h:66
#define BOUNDCVAR(cvar, m1, m2)
#define GAMMACHECK(cache, value)
qbool vid_gammatables_trivial
this is set to true if all color control values are at default setting, and it therefore would make n...
unsigned int vid_gammatables_serial
so other subsystems can poll if gamma parameters have changed; this starts with 0 and gets increased ...

References BOUNDCVAR, cacheblack, cachebrightness, cachecolorenable, cachecontrast, cachecontrastboost, cachegamma, cachegrey, cachewhite, f, fabs(), GAMMACHECK, cvar_t::integer, viddef_t::sRGB2D, viddef_t::sRGB3D, v_brightness, v_color_black_b, v_color_black_g, v_color_black_r, v_color_enable, v_color_grey_b, v_color_grey_g, v_color_grey_r, v_color_white_b, v_color_white_g, v_color_white_r, v_contrast, v_contrastboost, v_gamma, v_psycho, cvar_t::value, vid, vid_gammatables_serial, and vid_gammatables_trivial.

Referenced by VID_Finish().

◆ void()

void ( GLAPIENTRY * qglActiveTexture)

Variable Documentation

◆ alpha

Definition at line 247 of file vid_shared.c.

◆ arrays

GLuint* arrays

Definition at line 268 of file vid_shared.c.

◆ attachedObj

GLuint attachedObj

Definition at line 273 of file vid_shared.c.

◆ attachment

GLenum attachment

Definition at line 216 of file vid_shared.c.

◆ blue

Definition at line 247 of file vid_shared.c.

◆ border

Definition at line 252 of file vid_shared.c.

◆ buf

Definition at line 262 of file vid_shared.c.

◆ buffer

GLuint GLuint buffer

Definition at line 235 of file vid_shared.c.

◆ buffers

GLuint* buffers

Definition at line 263 of file vid_shared.c.

◆ bufs

const GLenum* bufs

Definition at line 278 of file vid_shared.c.

◆ bufSize

GLuint GLsizei bufSize

Definition at line 209 of file vid_shared.c.

◆ cacheblack

float cacheblack[3]
static

Definition at line 1097 of file vid_shared.c.

Referenced by VID_ApplyGammaToColor(), VID_BuildGammaTables(), and VID_UpdateGamma().

◆ cachebrightness

float cachebrightness
static

Definition at line 1097 of file vid_shared.c.

Referenced by VID_ApplyGammaToColor(), VID_BuildGammaTables(), and VID_UpdateGamma().

◆ cachecolorenable

int cachecolorenable
static

Definition at line 1098 of file vid_shared.c.

Referenced by VID_ApplyGammaToColor(), VID_BuildGammaTables(), and VID_UpdateGamma().

◆ cachecontrast

float cachecontrast
static

Definition at line 1097 of file vid_shared.c.

Referenced by VID_ApplyGammaToColor(), VID_BuildGammaTables(), and VID_UpdateGamma().

◆ cachecontrastboost

float cachecontrastboost
static

Definition at line 1097 of file vid_shared.c.

Referenced by VID_ApplyGammaToColor(), VID_BuildGammaTables(), and VID_UpdateGamma().

◆ cachegamma

float cachegamma
static

Definition at line 1097 of file vid_shared.c.

Referenced by VID_ApplyGammaToColor(), VID_BuildGammaTables(), and VID_UpdateGamma().

◆ cachegrey

float cachegrey[3]
static

Definition at line 1097 of file vid_shared.c.

Referenced by VID_ApplyGammaToColor(), VID_BuildGammaTables(), and VID_UpdateGamma().

◆ cachewhite

float cachewhite[3]
static

Definition at line 1097 of file vid_shared.c.

Referenced by VID_ApplyGammaToColor(), VID_BuildGammaTables(), and VID_UpdateGamma().

◆ count

GLsizei count

Definition at line 261 of file vid_shared.c.

Referenced by VID_SortModes().

◆ data

GLuint GLint* data

Definition at line 244 of file vid_shared.c.

◆ depth

Definition at line 253 of file vid_shared.c.

◆ dfactor

GLenum dfactor

Definition at line 242 of file vid_shared.c.

◆ dfactorAlpha

GLenum GLenum GLenum dfactorAlpha

Definition at line 243 of file vid_shared.c.

◆ dfactorRGB

GLenum dfactorRGB

Definition at line 243 of file vid_shared.c.

◆ dstX0

Definition at line 213 of file vid_shared.c.

◆ dstX1

Definition at line 213 of file vid_shared.c.

◆ dstY0

Definition at line 213 of file vid_shared.c.

◆ dstY1

Definition at line 213 of file vid_shared.c.

◆ enabled

Definition at line 261 of file vid_shared.c.

◆ far_val

GLclampf far_val

Definition at line 271 of file vid_shared.c.

◆ filter

Definition at line 213 of file vid_shared.c.

◆ first

GLint first

Definition at line 276 of file vid_shared.c.

◆ format

Definition at line 254 of file vid_shared.c.

◆ framebuffer

GLuint framebuffer

Definition at line 211 of file vid_shared.c.

◆ framebuffers

GLuint* framebuffers

Definition at line 214 of file vid_shared.c.

◆ gamma_forcenextframe

int gamma_forcenextframe = false
static

Definition at line 1096 of file vid_shared.c.

Referenced by VID_BuildGammaTables().

◆ gl_finish

cvar_t gl_finish = {CF_CLIENT | CF_CLIENT, "gl_finish", "0", "make the cpu wait for the graphics processor at the end of each rendered frame (can help with strange input or video lag problems on some machines)"}

Definition at line 156 of file vid_shared.c.

156{CF_CLIENT | CF_CLIENT, "gl_finish", "0", "make the cpu wait for the graphics processor at the end of each rendered frame (can help with strange input or video lag problems on some machines)"};

Referenced by VID_Finish(), and VID_Shared_Init().

◆ gl_info_driver

cvar_t gl_info_driver = {CF_CLIENT | CF_READONLY, "gl_info_driver", "", "name of driver library (opengl32.dll, libGL.so.1, or whatever)."}

Definition at line 132 of file vid_shared.c.

132{CF_CLIENT | CF_READONLY, "gl_info_driver", "", "name of driver library (opengl32.dll, libGL.so.1, or whatever)."};

Referenced by VID_InitModeGL(), and VID_Shared_Init().

◆ gl_info_extensions

cvar_t gl_info_extensions = {CF_CLIENT | CF_READONLY, "gl_info_extensions", "", "indicates extension list found by engine, space separated."}

Definition at line 131 of file vid_shared.c.

131{CF_CLIENT | CF_READONLY, "gl_info_extensions", "", "indicates extension list found by engine, space separated."};

Referenced by GL_CheckExtension(), VID_ClearExtensions(), and VID_Shared_Init().

◆ gl_info_renderer

cvar_t gl_info_renderer = {CF_CLIENT | CF_READONLY, "gl_info_renderer", "", "indicates graphics chip model and other information"}

Definition at line 129 of file vid_shared.c.

129{CF_CLIENT | CF_READONLY, "gl_info_renderer", "", "indicates graphics chip model and other information"};

Referenced by VID_InitModeGL(), and VID_Shared_Init().

◆ gl_info_vendor

cvar_t gl_info_vendor = {CF_CLIENT | CF_READONLY, "gl_info_vendor", "", "indicates brand of graphics chip"}

Definition at line 128 of file vid_shared.c.

128{CF_CLIENT | CF_READONLY, "gl_info_vendor", "", "indicates brand of graphics chip"};

Referenced by VID_InitModeGL(), and VID_Shared_Init().

◆ gl_info_version

cvar_t gl_info_version = {CF_CLIENT | CF_READONLY, "gl_info_version", "", "indicates version of current renderer. begins with 1.0.0, 1.1.0, 1.2.0, 1.3.1 etc."}

Definition at line 130 of file vid_shared.c.

130{CF_CLIENT | CF_READONLY, "gl_info_version", "", "indicates version of current renderer. begins with 1.0.0, 1.1.0, 1.2.0, 1.3.1 etc."};

Referenced by VID_InitModeGL(), and VID_Shared_Init().

◆ gl_renderer

const char* gl_renderer

graphics chip model and other information

Definition at line 192 of file vid_shared.c.

Referenced by GL_Setup(), R_Shadow_SetShadowMode(), and VID_InitModeGL().

◆ gl_vendor

const char* gl_vendor

brand of graphics chip

Definition at line 190 of file vid_shared.c.

Referenced by GL_Setup(), R_Shadow_SetShadowMode(), and VID_InitModeGL().

◆ gl_version

const char* gl_version

begins with 1.0.0, 1.1.0, 1.2.0, 1.2.1, 1.3.0, 1.3.1, or 1.4.0

Definition at line 194 of file vid_shared.c.

Referenced by GL_Setup(), R_SaveTextureDDSFile(), R_Shadow_SetShadowMode(), and VID_InitModeGL().

◆ green

GLboolean green

Definition at line 247 of file vid_shared.c.

◆ height

Definition at line 226 of file vid_shared.c.

Referenced by VID_SortModes(), and VID_Start().

◆ id

Definition at line 262 of file vid_shared.c.

◆ ids

GLuint* ids

Definition at line 209 of file vid_shared.c.

◆ imageSize

Definition at line 252 of file vid_shared.c.

◆ img

GLint void* img

Definition at line 297 of file vid_shared.c.

◆ in_client_mouse

qbool in_client_mouse = true

◆ in_mouse_x

float in_mouse_x

Definition at line 70 of file vid_shared.c.

Referenced by CL_Frame(), CL_Input(), IN_Move(), VM_CL_getmousepos(), and VM_M_getmousepos().

◆ in_mouse_y

float in_mouse_y

Definition at line 70 of file vid_shared.c.

◆ in_windowmouse_x

◆ in_windowmouse_y

float in_windowmouse_y

Definition at line 71 of file vid_shared.c.

Referenced by VID_Mode().

◆ index

GLuint index

Definition at line 234 of file vid_shared.c.

Referenced by VID_Shared_SetJoystick().

◆ indices

GLsizei GLenum const GLvoid* indices

Definition at line 279 of file vid_shared.c.

◆ infoLog

Definition at line 303 of file vid_shared.c.

◆ internalFormat

GLint GLenum internalFormat

Definition at line 337 of file vid_shared.c.

◆ internalformat

GLint GLenum internalformat

Definition at line 226 of file vid_shared.c.

◆ invert

GLboolean invert

Definition at line 331 of file vid_shared.c.

◆ joy_active

cvar_t joy_active = {CF_CLIENT | CF_READONLY, "joy_active", "0", "indicates that a joystick is active (detected and enabled)"}

Definition at line 84 of file vid_shared.c.

84{CF_CLIENT | CF_READONLY, "joy_active", "0", "indicates that a joystick is active (detected and enabled)"};

Referenced by VID_EnableJoystick(), and VID_Shared_Init().

◆ joy_axisforward

cvar_t joy_axisforward = {CF_CLIENT, "joy_axisforward", "1", "which joystick axis to query for forward/backward movement"}

Definition at line 88 of file vid_shared.c.

88{CF_CLIENT, "joy_axisforward", "1", "which joystick axis to query for forward/backward movement"};

Referenced by VID_ApplyJoyState(), VID_Shared_BuildJoyState_Finish(), and VID_Shared_Init().

◆ joy_axiskeyevents

cvar_t joy_axiskeyevents = {CF_CLIENT | CF_ARCHIVE, "joy_axiskeyevents", "0", "generate uparrow/leftarrow etc. keyevents for joystick axes, use if your joystick driver is not generating them"}

Definition at line 106 of file vid_shared.c.

106{CF_CLIENT | CF_ARCHIVE, "joy_axiskeyevents", "0", "generate uparrow/leftarrow etc. keyevents for joystick axes, use if your joystick driver is not generating them"};
#define CF_ARCHIVE
cvar should have its set value saved to config.cfg and persist across sessions
Definition cmd.h:53

Referenced by VID_ApplyJoyState(), VID_JoyBlockEmulatedKeys(), and VID_Shared_Init().

◆ joy_axiskeyevents_deadzone

cvar_t joy_axiskeyevents_deadzone = {CF_CLIENT | CF_ARCHIVE, "joy_axiskeyevents_deadzone", "0.5", "deadzone value for axes"}

Definition at line 107 of file vid_shared.c.

107{CF_CLIENT | CF_ARCHIVE, "joy_axiskeyevents_deadzone", "0.5", "deadzone value for axes"};

Referenced by VID_Shared_BuildJoyState_Finish(), and VID_Shared_Init().

◆ joy_axispitch

cvar_t joy_axispitch = {CF_CLIENT, "joy_axispitch", "3", "which joystick axis to query for looking up/down"}

Definition at line 91 of file vid_shared.c.

91{CF_CLIENT, "joy_axispitch", "3", "which joystick axis to query for looking up/down"};

Referenced by VID_ApplyJoyState(), and VID_Shared_Init().

◆ joy_axisroll

cvar_t joy_axisroll = {CF_CLIENT, "joy_axisroll", "-1", "which joystick axis to query for tilting head right/left"}

Definition at line 93 of file vid_shared.c.

93{CF_CLIENT, "joy_axisroll", "-1", "which joystick axis to query for tilting head right/left"};

◆ joy_axisside

cvar_t joy_axisside = {CF_CLIENT, "joy_axisside", "0", "which joystick axis to query for right/left movement"}

Definition at line 89 of file vid_shared.c.

89{CF_CLIENT, "joy_axisside", "0", "which joystick axis to query for right/left movement"};

Referenced by VID_ApplyJoyState(), VID_Shared_BuildJoyState_Finish(), and VID_Shared_Init().

◆ joy_axisup

cvar_t joy_axisup = {CF_CLIENT, "joy_axisup", "-1", "which joystick axis to query for up/down movement"}

Definition at line 90 of file vid_shared.c.

90{CF_CLIENT, "joy_axisup", "-1", "which joystick axis to query for up/down movement"};

Referenced by VID_ApplyJoyState(), and VID_Shared_Init().

◆ joy_axisyaw

cvar_t joy_axisyaw = {CF_CLIENT, "joy_axisyaw", "2", "which joystick axis to query for looking right/left"}

Definition at line 92 of file vid_shared.c.

92{CF_CLIENT, "joy_axisyaw", "2", "which joystick axis to query for looking right/left"};

Referenced by VID_ApplyJoyState(), and VID_Shared_Init().

◆ joy_deadzoneforward

cvar_t joy_deadzoneforward = {CF_CLIENT, "joy_deadzoneforward", "0", "deadzone tolerance, suggested values are in the range 0 to 0.01"}

Definition at line 94 of file vid_shared.c.

94{CF_CLIENT, "joy_deadzoneforward", "0", "deadzone tolerance, suggested values are in the range 0 to 0.01"};

Referenced by VID_ApplyJoyState(), and VID_Shared_Init().

◆ joy_deadzonepitch

cvar_t joy_deadzonepitch = {CF_CLIENT, "joy_deadzonepitch", "0", "deadzone tolerance, suggested values are in the range 0 to 0.01"}

Definition at line 97 of file vid_shared.c.

97{CF_CLIENT, "joy_deadzonepitch", "0", "deadzone tolerance, suggested values are in the range 0 to 0.01"};

Referenced by VID_ApplyJoyState(), and VID_Shared_Init().

◆ joy_deadzoneroll

cvar_t joy_deadzoneroll = {CF_CLIENT, "joy_deadzoneroll", "0", "deadzone tolerance, suggested values are in the range 0 to 0.01"}

Definition at line 99 of file vid_shared.c.

99{CF_CLIENT, "joy_deadzoneroll", "0", "deadzone tolerance, suggested values are in the range 0 to 0.01"};

◆ joy_deadzoneside

cvar_t joy_deadzoneside = {CF_CLIENT, "joy_deadzoneside", "0", "deadzone tolerance, suggested values are in the range 0 to 0.01"}

Definition at line 95 of file vid_shared.c.

95{CF_CLIENT, "joy_deadzoneside", "0", "deadzone tolerance, suggested values are in the range 0 to 0.01"};

Referenced by VID_ApplyJoyState(), and VID_Shared_Init().

◆ joy_deadzoneup

cvar_t joy_deadzoneup = {CF_CLIENT, "joy_deadzoneup", "0", "deadzone tolerance, suggested values are in the range 0 to 0.01"}

Definition at line 96 of file vid_shared.c.

96{CF_CLIENT, "joy_deadzoneup", "0", "deadzone tolerance, suggested values are in the range 0 to 0.01"};

Referenced by VID_ApplyJoyState(), and VID_Shared_Init().

◆ joy_deadzoneyaw

cvar_t joy_deadzoneyaw = {CF_CLIENT, "joy_deadzoneyaw", "0", "deadzone tolerance, suggested values are in the range 0 to 0.01"}

Definition at line 98 of file vid_shared.c.

98{CF_CLIENT, "joy_deadzoneyaw", "0", "deadzone tolerance, suggested values are in the range 0 to 0.01"};

Referenced by VID_ApplyJoyState(), and VID_Shared_Init().

◆ joy_detected

cvar_t joy_detected = {CF_CLIENT | CF_READONLY, "joy_detected", "0", "number of joysticks detected by engine"}

Definition at line 85 of file vid_shared.c.

85{CF_CLIENT | CF_READONLY, "joy_detected", "0", "number of joysticks detected by engine"};

Referenced by VID_EnableJoystick(), and VID_Shared_Init().

◆ joy_enable

cvar_t joy_enable = {CF_CLIENT | CF_ARCHIVE, "joy_enable", "0", "enables joystick support"}

Definition at line 86 of file vid_shared.c.

86{CF_CLIENT | CF_ARCHIVE, "joy_enable", "0", "enables joystick support"};

Referenced by VID_EnableJoystick(), and VID_Shared_Init().

◆ joy_index

cvar_t joy_index = {CF_CLIENT, "joy_index", "0", "selects which joystick to use if you have multiple (0 uses the first controller, 1 uses the second, ...)"}

Definition at line 87 of file vid_shared.c.

87{CF_CLIENT, "joy_index", "0", "selects which joystick to use if you have multiple (0 uses the first controller, 1 uses the second, ...)"};

Referenced by VID_EnableJoystick(), and VID_Shared_Init().

◆ joy_sensitivityforward

cvar_t joy_sensitivityforward = {CF_CLIENT, "joy_sensitivityforward", "-1", "movement multiplier"}

Definition at line 100 of file vid_shared.c.

100{CF_CLIENT, "joy_sensitivityforward", "-1", "movement multiplier"};

Referenced by VID_ApplyJoyState(), VID_Shared_BuildJoyState_Finish(), and VID_Shared_Init().

◆ joy_sensitivitypitch

cvar_t joy_sensitivitypitch = {CF_CLIENT, "joy_sensitivitypitch", "1", "movement multiplier"}

Definition at line 103 of file vid_shared.c.

103{CF_CLIENT, "joy_sensitivitypitch", "1", "movement multiplier"};

Referenced by VID_ApplyJoyState(), and VID_Shared_Init().

◆ joy_sensitivityroll

cvar_t joy_sensitivityroll = {CF_CLIENT, "joy_sensitivityroll", "1", "movement multiplier"}

Definition at line 105 of file vid_shared.c.

105{CF_CLIENT, "joy_sensitivityroll", "1", "movement multiplier"};

◆ joy_sensitivityside

cvar_t joy_sensitivityside = {CF_CLIENT, "joy_sensitivityside", "1", "movement multiplier"}

Definition at line 101 of file vid_shared.c.

101{CF_CLIENT, "joy_sensitivityside", "1", "movement multiplier"};

Referenced by VID_ApplyJoyState(), VID_Shared_BuildJoyState_Finish(), and VID_Shared_Init().

◆ joy_sensitivityup

cvar_t joy_sensitivityup = {CF_CLIENT, "joy_sensitivityup", "1", "movement multiplier"}

Definition at line 102 of file vid_shared.c.

102{CF_CLIENT, "joy_sensitivityup", "1", "movement multiplier"};

Referenced by VID_ApplyJoyState(), and VID_Shared_Init().

◆ joy_sensitivityyaw

cvar_t joy_sensitivityyaw = {CF_CLIENT, "joy_sensitivityyaw", "-1", "movement multiplier"}

Definition at line 104 of file vid_shared.c.

104{CF_CLIENT, "joy_sensitivityyaw", "-1", "movement multiplier"};

Referenced by VID_ApplyJoyState(), and VID_Shared_Init().

◆ joy_x360_axisforward

cvar_t joy_x360_axisforward = {CF_CLIENT, "joy_x360_axisforward", "1", "which joystick axis to query for forward/backward movement"}

Definition at line 108 of file vid_shared.c.

108{CF_CLIENT, "joy_x360_axisforward", "1", "which joystick axis to query for forward/backward movement"};

Referenced by VID_ApplyJoyState(), and VID_Shared_Init().

◆ joy_x360_axispitch

cvar_t joy_x360_axispitch = {CF_CLIENT, "joy_x360_axispitch", "3", "which joystick axis to query for looking up/down"}

Definition at line 111 of file vid_shared.c.

111{CF_CLIENT, "joy_x360_axispitch", "3", "which joystick axis to query for looking up/down"};

Referenced by VID_ApplyJoyState(), and VID_Shared_Init().

◆ joy_x360_axisroll

cvar_t joy_x360_axisroll = {CF_CLIENT, "joy_x360_axisroll", "-1", "which joystick axis to query for tilting head right/left"}

Definition at line 113 of file vid_shared.c.

113{CF_CLIENT, "joy_x360_axisroll", "-1", "which joystick axis to query for tilting head right/left"};

◆ joy_x360_axisside

cvar_t joy_x360_axisside = {CF_CLIENT, "joy_x360_axisside", "0", "which joystick axis to query for right/left movement"}

Definition at line 109 of file vid_shared.c.

109{CF_CLIENT, "joy_x360_axisside", "0", "which joystick axis to query for right/left movement"};

Referenced by VID_ApplyJoyState(), and VID_Shared_Init().

◆ joy_x360_axisup

cvar_t joy_x360_axisup = {CF_CLIENT, "joy_x360_axisup", "-1", "which joystick axis to query for up/down movement"}

Definition at line 110 of file vid_shared.c.

110{CF_CLIENT, "joy_x360_axisup", "-1", "which joystick axis to query for up/down movement"};

Referenced by VID_ApplyJoyState(), and VID_Shared_Init().

◆ joy_x360_axisyaw

cvar_t joy_x360_axisyaw = {CF_CLIENT, "joy_x360_axisyaw", "2", "which joystick axis to query for looking right/left"}

Definition at line 112 of file vid_shared.c.

112{CF_CLIENT, "joy_x360_axisyaw", "2", "which joystick axis to query for looking right/left"};

Referenced by VID_ApplyJoyState(), and VID_Shared_Init().

◆ joy_x360_deadzoneforward

cvar_t joy_x360_deadzoneforward = {CF_CLIENT, "joy_x360_deadzoneforward", "0.266", "deadzone tolerance, suggested values are in the range 0 to 0.01"}

Definition at line 114 of file vid_shared.c.

114{CF_CLIENT, "joy_x360_deadzoneforward", "0.266", "deadzone tolerance, suggested values are in the range 0 to 0.01"};

Referenced by VID_ApplyJoyState(), and VID_Shared_Init().

◆ joy_x360_deadzonepitch

cvar_t joy_x360_deadzonepitch = {CF_CLIENT, "joy_x360_deadzonepitch", "0.266", "deadzone tolerance, suggested values are in the range 0 to 0.01"}

Definition at line 117 of file vid_shared.c.

117{CF_CLIENT, "joy_x360_deadzonepitch", "0.266", "deadzone tolerance, suggested values are in the range 0 to 0.01"};

Referenced by VID_ApplyJoyState(), and VID_Shared_Init().

◆ joy_x360_deadzoneroll

cvar_t joy_x360_deadzoneroll = {CF_CLIENT, "joy_x360_deadzoneroll", "0.266", "deadzone tolerance, suggested values are in the range 0 to 0.01"}

Definition at line 119 of file vid_shared.c.

119{CF_CLIENT, "joy_x360_deadzoneroll", "0.266", "deadzone tolerance, suggested values are in the range 0 to 0.01"};

◆ joy_x360_deadzoneside

cvar_t joy_x360_deadzoneside = {CF_CLIENT, "joy_x360_deadzoneside", "0.266", "deadzone tolerance, suggested values are in the range 0 to 0.01"}

Definition at line 115 of file vid_shared.c.

115{CF_CLIENT, "joy_x360_deadzoneside", "0.266", "deadzone tolerance, suggested values are in the range 0 to 0.01"};

Referenced by VID_ApplyJoyState(), and VID_Shared_Init().

◆ joy_x360_deadzoneup

cvar_t joy_x360_deadzoneup = {CF_CLIENT, "joy_x360_deadzoneup", "0.266", "deadzone tolerance, suggested values are in the range 0 to 0.01"}

Definition at line 116 of file vid_shared.c.

116{CF_CLIENT, "joy_x360_deadzoneup", "0.266", "deadzone tolerance, suggested values are in the range 0 to 0.01"};

Referenced by VID_ApplyJoyState(), and VID_Shared_Init().

◆ joy_x360_deadzoneyaw

cvar_t joy_x360_deadzoneyaw = {CF_CLIENT, "joy_x360_deadzoneyaw", "0.266", "deadzone tolerance, suggested values are in the range 0 to 0.01"}

Definition at line 118 of file vid_shared.c.

118{CF_CLIENT, "joy_x360_deadzoneyaw", "0.266", "deadzone tolerance, suggested values are in the range 0 to 0.01"};

Referenced by VID_ApplyJoyState(), and VID_Shared_Init().

◆ joy_x360_sensitivityforward

cvar_t joy_x360_sensitivityforward = {CF_CLIENT, "joy_x360_sensitivityforward", "1", "movement multiplier"}

Definition at line 120 of file vid_shared.c.

120{CF_CLIENT, "joy_x360_sensitivityforward", "1", "movement multiplier"};

Referenced by VID_ApplyJoyState(), and VID_Shared_Init().

◆ joy_x360_sensitivitypitch

cvar_t joy_x360_sensitivitypitch = {CF_CLIENT, "joy_x360_sensitivitypitch", "-1", "movement multiplier"}

Definition at line 123 of file vid_shared.c.

123{CF_CLIENT, "joy_x360_sensitivitypitch", "-1", "movement multiplier"};

Referenced by VID_ApplyJoyState(), and VID_Shared_Init().

◆ joy_x360_sensitivityroll

cvar_t joy_x360_sensitivityroll = {CF_CLIENT, "joy_x360_sensitivityroll", "1", "movement multiplier"}

Definition at line 125 of file vid_shared.c.

125{CF_CLIENT, "joy_x360_sensitivityroll", "1", "movement multiplier"};

◆ joy_x360_sensitivityside

cvar_t joy_x360_sensitivityside = {CF_CLIENT, "joy_x360_sensitivityside", "1", "movement multiplier"}

Definition at line 121 of file vid_shared.c.

121{CF_CLIENT, "joy_x360_sensitivityside", "1", "movement multiplier"};

Referenced by VID_ApplyJoyState(), and VID_Shared_Init().

◆ joy_x360_sensitivityup

cvar_t joy_x360_sensitivityup = {CF_CLIENT, "joy_x360_sensitivityup", "1", "movement multiplier"}

Definition at line 122 of file vid_shared.c.

122{CF_CLIENT, "joy_x360_sensitivityup", "1", "movement multiplier"};

Referenced by VID_ApplyJoyState(), and VID_Shared_Init().

◆ joy_x360_sensitivityyaw

cvar_t joy_x360_sensitivityyaw = {CF_CLIENT, "joy_x360_sensitivityyaw", "-1", "movement multiplier"}

Definition at line 124 of file vid_shared.c.

124{CF_CLIENT, "joy_x360_sensitivityyaw", "-1", "movement multiplier"};

Referenced by VID_ApplyJoyState(), and VID_Shared_Init().

◆ joybuttonkey

int joybuttonkey[MAXJOYBUTTON][2]
static
Initial value:
=
{
{K_JOY1, K_ENTER}, {K_JOY2, K_ESCAPE}, {K_JOY3, 0}, {K_JOY4, 0}, {K_JOY5, 0}, {K_JOY6, 0}, {K_JOY7, 0}, {K_JOY8, 0}, {K_JOY9, 0}, {K_JOY10, 0}, {K_JOY11, 0}, {K_JOY12, 0}, {K_JOY13, 0}, {K_JOY14, 0}, {K_JOY15, 0}, {K_JOY16, 0},
{K_AUX1, 0}, {K_AUX2, 0}, {K_AUX3, 0}, {K_AUX4, 0}, {K_AUX5, 0}, {K_AUX6, 0}, {K_AUX7, 0}, {K_AUX8, 0}, {K_AUX9, 0}, {K_AUX10, 0}, {K_AUX11, 0}, {K_AUX12, 0}, {K_AUX13, 0}, {K_AUX14, 0}, {K_AUX15, 0}, {K_AUX16, 0},
}
float K_AUX11
Definition keycodes.qc:103
float K_AUX12
Definition keycodes.qc:104
float K_AUX3
Definition keycodes.qc:95
float K_AUX7
Definition keycodes.qc:99
float K_JOY1
Definition keycodes.qc:83
float K_JOY3
Definition keycodes.qc:85
float K_AUX16
Definition keycodes.qc:108
float K_AUX15
Definition keycodes.qc:107
float K_AUX8
Definition keycodes.qc:100
float K_ENTER
Definition keycodes.qc:8
float K_AUX10
Definition keycodes.qc:102
float K_AUX13
Definition keycodes.qc:105
float K_JOY2
Definition keycodes.qc:84
float K_AUX14
Definition keycodes.qc:106
float K_AUX9
Definition keycodes.qc:101
float K_AUX5
Definition keycodes.qc:97
float K_AUX6
Definition keycodes.qc:98
float K_JOY4
Definition keycodes.qc:86
float K_AUX2
Definition keycodes.qc:94
float K_AUX1
Definition keycodes.qc:93
float K_ESCAPE
Definition keycodes.qc:9
float K_AUX4
Definition keycodes.qc:96
@ K_JOY7
Definition keys.h:159
@ K_JOY12
Definition keys.h:164
@ K_JOY10
Definition keys.h:162
@ K_JOY_DOWN
Definition keys.h:235
@ K_JOY13
Definition keys.h:165
@ K_JOY14
Definition keys.h:166
@ K_JOY15
Definition keys.h:167
@ K_JOY16
Definition keys.h:168
@ K_JOY_LEFT
Definition keys.h:236
@ K_JOY_RIGHT
Definition keys.h:237
@ K_JOY5
Definition keys.h:157
@ K_JOY9
Definition keys.h:161
@ K_JOY_UP
Definition keys.h:234
@ K_JOY11
Definition keys.h:163
@ K_JOY8
Definition keys.h:160
@ K_JOY6
Definition keys.h:158

Definition at line 977 of file vid_shared.c.

978{
979 {K_JOY1, K_ENTER}, {K_JOY2, K_ESCAPE}, {K_JOY3, 0}, {K_JOY4, 0}, {K_JOY5, 0}, {K_JOY6, 0}, {K_JOY7, 0}, {K_JOY8, 0}, {K_JOY9, 0}, {K_JOY10, 0}, {K_JOY11, 0}, {K_JOY12, 0}, {K_JOY13, 0}, {K_JOY14, 0}, {K_JOY15, 0}, {K_JOY16, 0},
980 {K_AUX1, 0}, {K_AUX2, 0}, {K_AUX3, 0}, {K_AUX4, 0}, {K_AUX5, 0}, {K_AUX6, 0}, {K_AUX7, 0}, {K_AUX8, 0}, {K_AUX9, 0}, {K_AUX10, 0}, {K_AUX11, 0}, {K_AUX12, 0}, {K_AUX13, 0}, {K_AUX14, 0}, {K_AUX15, 0}, {K_AUX16, 0},
982};

Referenced by VID_ApplyJoyState().

◆ joybuttonkey360

int joybuttonkey360[][2]
static
Initial value:
=
{
{K_X360_X, 0},
{K_X360_Y, 0},
}
@ K_X360_A
Definition keys.h:218
@ K_X360_BACK
Definition keys.h:213
@ K_X360_X
Definition keys.h:220
@ K_X360_RIGHT_SHOULDER
Definition keys.h:217
@ K_X360_RIGHT_THUMB_UP
Definition keys.h:228
@ K_X360_DPAD_RIGHT
Definition keys.h:211
@ K_X360_RIGHT_TRIGGER
Definition keys.h:223
@ K_X360_DPAD_UP
Definition keys.h:208
@ K_X360_LEFT_THUMB_RIGHT
Definition keys.h:227
@ K_X360_DPAD_DOWN
Definition keys.h:209
@ K_X360_DPAD_LEFT
Definition keys.h:210
@ K_X360_RIGHT_THUMB
Definition keys.h:215
@ K_X360_LEFT_THUMB_DOWN
Definition keys.h:225
@ K_X360_RIGHT_THUMB_DOWN
Definition keys.h:229
@ K_X360_RIGHT_THUMB_RIGHT
Definition keys.h:231
@ K_X360_START
Definition keys.h:212
@ K_X360_RIGHT_THUMB_LEFT
Definition keys.h:230
@ K_X360_LEFT_THUMB_UP
Definition keys.h:224
@ K_X360_LEFT_SHOULDER
Definition keys.h:216
@ K_X360_LEFT_THUMB_LEFT
Definition keys.h:226
@ K_X360_LEFT_TRIGGER
Definition keys.h:222
@ K_X360_Y
Definition keys.h:221
@ K_X360_B
Definition keys.h:219
@ K_X360_LEFT_THUMB
Definition keys.h:214

Definition at line 984 of file vid_shared.c.

Referenced by VID_ApplyJoyState().

◆ layer

Definition at line 219 of file vid_shared.c.

◆ length

GLsizei const GLchar const GLint* length

Definition at line 262 of file vid_shared.c.

◆ lengths

Definition at line 209 of file vid_shared.c.

◆ level

GLint level

Definition at line 217 of file vid_shared.c.

◆ location

GLint location

Definition at line 317 of file vid_shared.c.

◆ lod

GLint lod

Definition at line 297 of file vid_shared.c.

◆ mask

GLint GLuint mask

Definition at line 213 of file vid_shared.c.

◆ maxCount

GLsizei maxCount

Definition at line 295 of file vid_shared.c.

◆ maxLength

GLsizei maxLength

Definition at line 289 of file vid_shared.c.

◆ messageLog

Definition at line 209 of file vid_shared.c.

◆ mode

GLenum mode

Definition at line 323 of file vid_shared.c.

Referenced by VID_Mode().

◆ name

Definition at line 205 of file vid_shared.c.

Referenced by GL_CheckExtension().

◆ normalized

GLint GLenum GLboolean normalized

Definition at line 402 of file vid_shared.c.

◆ obj

Definition at line 232 of file vid_shared.c.

◆ offset

GLintptr offset

Definition at line 237 of file vid_shared.c.

◆ openglfuncs

glfunction_t openglfuncs[]
static

Definition at line 420 of file vid_shared.c.

421{
422 {"core", "glActiveTexture", (void **) &qglActiveTexture},
423 {"core", "glAttachShader", (void **) &qglAttachShader},
424 {"core", "glBeginQuery", (void **) &qglBeginQuery},
425 {"core", "glBindAttribLocation", (void **) &qglBindAttribLocation},
426 {"core", "glBindBuffer", (void **) &qglBindBuffer},
427 {"core", "glBindBufferBase", (void **) &qglBindBufferBase},
428 {"core", "glBindBufferRange", (void **) &qglBindBufferRange},
429 {"core", "glBindFramebuffer", (void **) &qglBindFramebuffer},
430 {"core", "glBindRenderbuffer", (void **) &qglBindRenderbuffer},
431 {"core", "glBindTexture", (void **) &qglBindTexture},
432 {"core", "glBindVertexArray", (void **) &qglBindVertexArray},
433 {"core", "glBlendEquation", (void **) &qglBlendEquation},
434 {"core", "glBlendFunc", (void **) &qglBlendFunc},
435 {"core", "glBlendFuncSeparate", (void **) &qglBlendFuncSeparate},
436 {"core", "glBlitFramebuffer", (void **) &qglBlitFramebuffer},
437 {"core", "glBufferData", (void **) &qglBufferData},
438 {"core", "glBufferSubData", (void **) &qglBufferSubData},
439 {"core", "glCheckFramebufferStatus", (void **) &qglCheckFramebufferStatus},
440 {"core", "glClear", (void **) &qglClear},
441 {"core", "glClearColor", (void **) &qglClearColor},
442 {"core", "glClearDepth", (void **) &qglClearDepth},
443 {"core", "glClearStencil", (void **) &qglClearStencil},
444 {"core", "glColorMask", (void **) &qglColorMask},
445 {"core", "glCompileShader", (void **) &qglCompileShader},
446 {"core", "glCompressedTexImage2D", (void **) &qglCompressedTexImage2D},
447 {"core", "glCompressedTexImage3D", (void **) &qglCompressedTexImage3D},
448 {"core", "glCompressedTexSubImage2D", (void **) &qglCompressedTexSubImage2D},
449 {"core", "glCompressedTexSubImage3D", (void **) &qglCompressedTexSubImage3D},
450 {"core", "glCopyTexImage2D", (void **) &qglCopyTexImage2D},
451 {"core", "glCopyTexSubImage2D", (void **) &qglCopyTexSubImage2D},
452 {"core", "glCopyTexSubImage3D", (void **) &qglCopyTexSubImage3D},
453 {"core", "glCreateProgram", (void **) &qglCreateProgram},
454 {"core", "glCreateShader", (void **) &qglCreateShader},
455 {"core", "glCullFace", (void **) &qglCullFace},
456 {"core", "glDeleteBuffers", (void **) &qglDeleteBuffers},
457 {"core", "glDeleteFramebuffers", (void **) &qglDeleteFramebuffers},
458 {"core", "glDeleteProgram", (void **) &qglDeleteProgram},
459 {"core", "glDeleteQueries", (void **) &qglDeleteQueries},
460 {"core", "glDeleteRenderbuffers", (void **) &qglDeleteRenderbuffers},
461 {"core", "glDeleteShader", (void **) &qglDeleteShader},
462 {"core", "glDeleteTextures", (void **) &qglDeleteTextures},
463 {"core", "glDeleteVertexArrays", (void **)&qglDeleteVertexArrays},
464 {"core", "glDepthFunc", (void **) &qglDepthFunc},
465 {"core", "glDepthMask", (void **) &qglDepthMask},
466 {"core", "glDepthRange", (void **) &qglDepthRange},
467 {"core", "glDepthRangef", (void **) &qglDepthRangef},
468 {"core", "glDetachShader", (void **) &qglDetachShader},
469 {"core", "glDisable", (void **) &qglDisable},
470 {"core", "glDisableVertexAttribArray", (void **) &qglDisableVertexAttribArray},
471 {"core", "glDrawArrays", (void **) &qglDrawArrays},
472 {"core", "glDrawBuffer", (void **) &qglDrawBuffer},
473 {"core", "glDrawBuffers", (void **) &qglDrawBuffers},
474 {"core", "glDrawElements", (void **) &qglDrawElements},
475 {"core", "glEnable", (void **) &qglEnable},
476 {"core", "glEnableVertexAttribArray", (void **) &qglEnableVertexAttribArray},
477 {"core", "glEndQuery", (void **) &qglEndQuery},
478 {"core", "glFinish", (void **) &qglFinish},
479 {"core", "glFlush", (void **) &qglFlush},
480 {"core", "glFramebufferRenderbuffer", (void **) &qglFramebufferRenderbuffer},
481 {"core", "glFramebufferTexture1D", (void **) &qglFramebufferTexture1D},
482 {"core", "glFramebufferTexture2D", (void **) &qglFramebufferTexture2D},
483 {"core", "glFramebufferTexture3D", (void **) &qglFramebufferTexture3D},
484 {"core", "glFramebufferTextureLayer", (void **) &qglFramebufferTextureLayer},
485 {"core", "glGenBuffers", (void **) &qglGenBuffers},
486 {"core", "glGenFramebuffers", (void **) &qglGenFramebuffers},
487 {"core", "glGenQueries", (void **) &qglGenQueries},
488 {"core", "glGenRenderbuffers", (void **) &qglGenRenderbuffers},
489 {"core", "glGenTextures", (void **) &qglGenTextures},
490 {"core", "glGenVertexArrays", (void **)&qglGenVertexArrays},
491 {"core", "glGenerateMipmap", (void **) &qglGenerateMipmap},
492 {"core", "glGetActiveAttrib", (void **) &qglGetActiveAttrib},
493 {"core", "glGetActiveUniform", (void **) &qglGetActiveUniform},
494 {"core", "glGetActiveUniformBlockName", (void **) &qglGetActiveUniformBlockName},
495 {"core", "glGetActiveUniformBlockiv", (void **) &qglGetActiveUniformBlockiv},
496 {"core", "glGetActiveUniformName", (void **) &qglGetActiveUniformName},
497 {"core", "glGetActiveUniformsiv", (void **) &qglGetActiveUniformsiv},
498 {"core", "glGetAttachedShaders", (void **) &qglGetAttachedShaders},
499 {"core", "glGetAttribLocation", (void **) &qglGetAttribLocation},
500 {"core", "glGetBooleanv", (void **) &qglGetBooleanv},
501 {"core", "glGetCompressedTexImage", (void **) &qglGetCompressedTexImage},
502 {"core", "glGetDoublev", (void **) &qglGetDoublev},
503 {"core", "glGetError", (void **) &qglGetError},
504 {"core", "glGetFloatv", (void **) &qglGetFloatv},
505 {"core", "glGetFramebufferAttachmentParameteriv", (void **) &qglGetFramebufferAttachmentParameteriv},
506 {"core", "glGetIntegeri_v", (void **) &qglGetIntegeri_v},
507 {"core", "glGetIntegerv", (void **) &qglGetIntegerv},
508 {"core", "glGetProgramInfoLog", (void **) &qglGetProgramInfoLog},
509 {"core", "glGetProgramiv", (void **) &qglGetProgramiv},
510 {"core", "glGetQueryObjectiv", (void **) &qglGetQueryObjectiv},
511 {"core", "glGetQueryObjectuiv", (void **) &qglGetQueryObjectuiv},
512 {"core", "glGetQueryiv", (void **) &qglGetQueryiv},
513 {"core", "glGetRenderbufferParameteriv", (void **) &qglGetRenderbufferParameteriv},
514 {"core", "glGetShaderInfoLog", (void **) &qglGetShaderInfoLog},
515 {"core", "glGetShaderSource", (void **) &qglGetShaderSource},
516 {"core", "glGetShaderiv", (void **) &qglGetShaderiv},
517 {"core", "glGetString", (void **) &qglGetString},
518 {"core", "glGetStringi", (void **) &qglGetStringi},
519 {"core", "glGetTexImage", (void **) &qglGetTexImage},
520 {"core", "glGetTexLevelParameterfv", (void **) &qglGetTexLevelParameterfv},
521 {"core", "glGetTexLevelParameteriv", (void **) &qglGetTexLevelParameteriv},
522 {"core", "glGetTexParameterfv", (void **) &qglGetTexParameterfv},
523 {"core", "glGetTexParameteriv", (void **) &qglGetTexParameteriv},
524 {"core", "glGetUniformBlockIndex", (void **) &qglGetUniformBlockIndex},
525 {"core", "glGetUniformIndices", (void **) &qglGetUniformIndices},
526 {"core", "glGetUniformLocation", (void **) &qglGetUniformLocation},
527 {"core", "glGetUniformfv", (void **) &qglGetUniformfv},
528 {"core", "glGetUniformiv", (void **) &qglGetUniformiv},
529 {"core", "glGetVertexAttribPointerv", (void **) &qglGetVertexAttribPointerv},
530 {"core", "glGetVertexAttribdv", (void **) &qglGetVertexAttribdv},
531 {"core", "glGetVertexAttribfv", (void **) &qglGetVertexAttribfv},
532 {"core", "glGetVertexAttribiv", (void **) &qglGetVertexAttribiv},
533 {"core", "glHint", (void **) &qglHint},
534 {"core", "glIsBuffer", (void **) &qglIsBuffer},
535 {"core", "glIsEnabled", (void **) &qglIsEnabled},
536 {"core", "glIsFramebuffer", (void **) &qglIsFramebuffer},
537 {"core", "glIsQuery", (void **) &qglIsQuery},
538 {"core", "glIsRenderbuffer", (void **) &qglIsRenderbuffer},
539 {"core", "glLinkProgram", (void **) &qglLinkProgram},
540 {"core", "glMapBuffer", (void **) &qglMapBuffer},
541 {"core", "glPixelStorei", (void **) &qglPixelStorei},
542 {"core", "glPointSize", (void **) &qglPointSize},
543 {"core", "glPolygonMode", (void **) &qglPolygonMode},
544 {"core", "glPolygonOffset", (void **) &qglPolygonOffset},
545 {"core", "glReadBuffer", (void **) &qglReadBuffer},
546 {"core", "glReadPixels", (void **) &qglReadPixels},
547 {"core", "glRenderbufferStorage", (void **) &qglRenderbufferStorage},
548 {"core", "glRenderbufferStorageMultisample", (void **) &qglRenderbufferStorageMultisample},
549 {"core", "glSampleCoverage", (void **) &qglSampleCoverage},
550 {"core", "glScissor", (void **) &qglScissor},
551 {"core", "glShaderSource", (void **) &qglShaderSource},
552 {"core", "glStencilFunc", (void **) &qglStencilFunc},
553 {"core", "glStencilMask", (void **) &qglStencilMask},
554 {"core", "glStencilOp", (void **) &qglStencilOp},
555 {"core", "glTexImage2D", (void **) &qglTexImage2D},
556 {"core", "glTexImage3D", (void **) &qglTexImage3D},
557 {"core", "glTexParameterf", (void **) &qglTexParameterf},
558 {"core", "glTexParameterfv", (void **) &qglTexParameterfv},
559 {"core", "glTexParameteri", (void **) &qglTexParameteri},
560 {"core", "glTexSubImage2D", (void **) &qglTexSubImage2D},
561 {"core", "glTexSubImage3D", (void **) &qglTexSubImage3D},
562 {"core", "glUniform1f", (void **) &qglUniform1f},
563 {"core", "glUniform1fv", (void **) &qglUniform1fv},
564 {"core", "glUniform1i", (void **) &qglUniform1i},
565 {"core", "glUniform1iv", (void **) &qglUniform1iv},
566 {"core", "glUniform2f", (void **) &qglUniform2f},
567 {"core", "glUniform2fv", (void **) &qglUniform2fv},
568 {"core", "glUniform2i", (void **) &qglUniform2i},
569 {"core", "glUniform2iv", (void **) &qglUniform2iv},
570 {"core", "glUniform3f", (void **) &qglUniform3f},
571 {"core", "glUniform3fv", (void **) &qglUniform3fv},
572 {"core", "glUniform3i", (void **) &qglUniform3i},
573 {"core", "glUniform3iv", (void **) &qglUniform3iv},
574 {"core", "glUniform4f", (void **) &qglUniform4f},
575 {"core", "glUniform4fv", (void **) &qglUniform4fv},
576 {"core", "glUniform4i", (void **) &qglUniform4i},
577 {"core", "glUniform4iv", (void **) &qglUniform4iv},
578 {"core", "glUniformBlockBinding", (void **) &qglUniformBlockBinding},
579 {"core", "glUniformMatrix2fv", (void **) &qglUniformMatrix2fv},
580 {"core", "glUniformMatrix3fv", (void **) &qglUniformMatrix3fv},
581 {"core", "glUniformMatrix4fv", (void **) &qglUniformMatrix4fv},
582 {"core", "glUnmapBuffer", (void **) &qglUnmapBuffer},
583 {"core", "glUseProgram", (void **) &qglUseProgram},
584 {"core", "glValidateProgram", (void **) &qglValidateProgram},
585 {"core", "glVertexAttrib1d", (void **) &qglVertexAttrib1d},
586 {"core", "glVertexAttrib1dv", (void **) &qglVertexAttrib1dv},
587 {"core", "glVertexAttrib1f", (void **) &qglVertexAttrib1f},
588 {"core", "glVertexAttrib1fv", (void **) &qglVertexAttrib1fv},
589 {"core", "glVertexAttrib1s", (void **) &qglVertexAttrib1s},
590 {"core", "glVertexAttrib1sv", (void **) &qglVertexAttrib1sv},
591 {"core", "glVertexAttrib2d", (void **) &qglVertexAttrib2d},
592 {"core", "glVertexAttrib2dv", (void **) &qglVertexAttrib2dv},
593 {"core", "glVertexAttrib2f", (void **) &qglVertexAttrib2f},
594 {"core", "glVertexAttrib2fv", (void **) &qglVertexAttrib2fv},
595 {"core", "glVertexAttrib2s", (void **) &qglVertexAttrib2s},
596 {"core", "glVertexAttrib2sv", (void **) &qglVertexAttrib2sv},
597 {"core", "glVertexAttrib3d", (void **) &qglVertexAttrib3d},
598 {"core", "glVertexAttrib3dv", (void **) &qglVertexAttrib3dv},
599 {"core", "glVertexAttrib3f", (void **) &qglVertexAttrib3f},
600 {"core", "glVertexAttrib3fv", (void **) &qglVertexAttrib3fv},
601 {"core", "glVertexAttrib3s", (void **) &qglVertexAttrib3s},
602 {"core", "glVertexAttrib3sv", (void **) &qglVertexAttrib3sv},
603 {"core", "glVertexAttrib4Nbv", (void **) &qglVertexAttrib4Nbv},
604 {"core", "glVertexAttrib4Niv", (void **) &qglVertexAttrib4Niv},
605 {"core", "glVertexAttrib4Nsv", (void **) &qglVertexAttrib4Nsv},
606 {"core", "glVertexAttrib4Nub", (void **) &qglVertexAttrib4Nub},
607 {"core", "glVertexAttrib4Nubv", (void **) &qglVertexAttrib4Nubv},
608 {"core", "glVertexAttrib4Nuiv", (void **) &qglVertexAttrib4Nuiv},
609 {"core", "glVertexAttrib4Nusv", (void **) &qglVertexAttrib4Nusv},
610 {"core", "glVertexAttrib4bv", (void **) &qglVertexAttrib4bv},
611 {"core", "glVertexAttrib4d", (void **) &qglVertexAttrib4d},
612 {"core", "glVertexAttrib4dv", (void **) &qglVertexAttrib4dv},
613 {"core", "glVertexAttrib4f", (void **) &qglVertexAttrib4f},
614 {"core", "glVertexAttrib4fv", (void **) &qglVertexAttrib4fv},
615 {"core", "glVertexAttrib4iv", (void **) &qglVertexAttrib4iv},
616 {"core", "glVertexAttrib4s", (void **) &qglVertexAttrib4s},
617 {"core", "glVertexAttrib4sv", (void **) &qglVertexAttrib4sv},
618 {"core", "glVertexAttrib4ubv", (void **) &qglVertexAttrib4ubv},
619 {"core", "glVertexAttrib4uiv", (void **) &qglVertexAttrib4uiv},
620 {"core", "glVertexAttrib4usv", (void **) &qglVertexAttrib4usv},
621 {"core", "glVertexAttribPointer", (void **) &qglVertexAttribPointer},
622 {"core", "glViewport", (void **) &qglViewport},
623 {"glBindFragDataLocation", "glBindFragDataLocation", (void **) &qglBindFragDataLocation}, // optional (no preference)
624 {"GL_ARB_debug_output", "glDebugMessageControlARB", (void **)&qglDebugMessageControlARB},
625 {"GL_ARB_debug_output", "glDebugMessageInsertARB", (void **)&qglDebugMessageInsertARB},
626 {"GL_ARB_debug_output", "glDebugMessageCallbackARB", (void **)&qglDebugMessageCallbackARB},
627 {"GL_ARB_debug_output", "glGetDebugMessageLogARB", (void **)&qglGetDebugMessageLogARB},
628 {"GL_ARB_debug_output", "glGetPointerv", (void **)&qglGetPointerv},
629 {NULL, NULL, NULL}
630};
GLvoid *GLAPIENTRY * qglMapBuffer(GLenum target, GLenum access)

Referenced by GL_CheckExtension(), and GL_InitFunctions().

◆ param

GLenum GLint param

Definition at line 325 of file vid_shared.c.

◆ params

GLenum GLfloat* params

Definition at line 224 of file vid_shared.c.

◆ pixels

Definition at line 311 of file vid_shared.c.

◆ pname

GLenum pname

Definition at line 224 of file vid_shared.c.

◆ pointer

Definition at line 319 of file vid_shared.c.

◆ qid

GLuint qid

Definition at line 233 of file vid_shared.c.

◆ ref

GLint ref

Definition at line 334 of file vid_shared.c.

◆ renderbuffer

GLenum GLenum GLuint renderbuffer

Definition at line 212 of file vid_shared.c.

◆ renderbuffers

GLuint* renderbuffers

Definition at line 215 of file vid_shared.c.

◆ renderbuffertarget

GLenum GLenum renderbuffertarget

Definition at line 216 of file vid_shared.c.

◆ samples

GLsizei samples

Definition at line 227 of file vid_shared.c.

Referenced by GL_Setup().

◆ severities

Definition at line 209 of file vid_shared.c.

◆ severity

GLenum GLuint GLenum severity

Definition at line 261 of file vid_shared.c.

◆ sfactorAlpha

GLenum GLenum sfactorAlpha

Definition at line 243 of file vid_shared.c.

◆ size

GLint size

Definition at line 237 of file vid_shared.c.

◆ source

Definition at line 309 of file vid_shared.c.

◆ sources

GLsizei GLenum* sources

Definition at line 209 of file vid_shared.c.

◆ srcX1

GLint GLint srcX1

Definition at line 213 of file vid_shared.c.

◆ srcY0

GLint srcY0

Definition at line 213 of file vid_shared.c.

◆ srcY1

GLint GLint GLint srcY1

Definition at line 213 of file vid_shared.c.

◆ stride

Definition at line 402 of file vid_shared.c.

◆ string

GLsizei const GLchar** string ( void s)

Definition at line 333 of file vid_shared.c.

◆ textarget

GLenum GLenum textarget

Definition at line 217 of file vid_shared.c.

◆ texture

GLuint texture

Definition at line 217 of file vid_shared.c.

◆ textures

GLuint* textures

Definition at line 267 of file vid_shared.c.

◆ transpose

GLsizei GLboolean transpose

Definition at line 361 of file vid_shared.c.

◆ type

GLint GLenum type

Definition at line 261 of file vid_shared.c.

◆ types

Definition at line 209 of file vid_shared.c.

◆ uniformBlockBinding

GLuint GLuint uniformBlockBinding

Definition at line 360 of file vid_shared.c.

◆ uniformBlockIndex

GLuint uniformBlockIndex

Definition at line 291 of file vid_shared.c.

◆ uniformBlockName

GLuint GLsizei GLsizei char* uniformBlockName

Definition at line 210 of file vid_shared.c.

◆ uniformCount

GLsizei uniformCount

Definition at line 294 of file vid_shared.c.

◆ uniformIndex

GLuint uniformIndex

Definition at line 293 of file vid_shared.c.

◆ uniformIndices

GLsizei const char GLuint* uniformIndices

Definition at line 294 of file vid_shared.c.

◆ uniformName

GLuint GLsizei GLsizei char* uniformName

Definition at line 293 of file vid_shared.c.

◆ uniformNames

GLsizei const char** uniformNames

Definition at line 316 of file vid_shared.c.

◆ units

GLfloat units

Definition at line 328 of file vid_shared.c.

◆ usage

GLsizeiptr const GLvoid GLenum usage

Definition at line 244 of file vid_shared.c.

◆ userParam

const GLvoid* userParam

Definition at line 260 of file vid_shared.c.

◆ v

const GLushort* v

Definition at line 367 of file vid_shared.c.

◆ v0

GLshort v0

Definition at line 344 of file vid_shared.c.

◆ v1

Definition at line 348 of file vid_shared.c.

◆ v2

Definition at line 352 of file vid_shared.c.

◆ v3

Definition at line 356 of file vid_shared.c.

◆ v_brightness

cvar_t v_brightness = {CF_CLIENT | CF_ARCHIVE, "v_brightness", "0", "brightness of black, useful for monitors that are too dark"}

Definition at line 174 of file vid_shared.c.

174{CF_CLIENT | CF_ARCHIVE, "v_brightness", "0", "brightness of black, useful for monitors that are too dark"};

Referenced by M_Menu_Options_ColorControl_AdjustSliders(), M_Options_ColorControl_Draw(), M_Options_ColorControl_Key(), VID_Shared_Init(), and VID_UpdateGamma().

◆ v_color_black_b

cvar_t v_color_black_b = {CF_CLIENT | CF_ARCHIVE, "v_color_black_b", "0", "desired color of black"}

Definition at line 179 of file vid_shared.c.

179{CF_CLIENT | CF_ARCHIVE, "v_color_black_b", "0", "desired color of black"};

Referenced by M_Menu_Options_ColorControl_AdjustSliders(), M_Options_ColorControl_Draw(), M_Options_ColorControl_Key(), VID_Shared_Init(), and VID_UpdateGamma().

◆ v_color_black_g

cvar_t v_color_black_g = {CF_CLIENT | CF_ARCHIVE, "v_color_black_g", "0", "desired color of black"}

Definition at line 178 of file vid_shared.c.

178{CF_CLIENT | CF_ARCHIVE, "v_color_black_g", "0", "desired color of black"};

Referenced by M_Menu_Options_ColorControl_AdjustSliders(), M_Options_ColorControl_Draw(), M_Options_ColorControl_Key(), VID_Shared_Init(), and VID_UpdateGamma().

◆ v_color_black_r

cvar_t v_color_black_r = {CF_CLIENT | CF_ARCHIVE, "v_color_black_r", "0", "desired color of black"}

Definition at line 177 of file vid_shared.c.

177{CF_CLIENT | CF_ARCHIVE, "v_color_black_r", "0", "desired color of black"};

Referenced by M_Menu_Options_ColorControl_AdjustSliders(), M_Options_ColorControl_Draw(), M_Options_ColorControl_Key(), VID_Shared_Init(), and VID_UpdateGamma().

◆ v_color_enable

cvar_t v_color_enable = {CF_CLIENT | CF_ARCHIVE, "v_color_enable", "0", "enables black-grey-white color correction curve controls"}

Definition at line 176 of file vid_shared.c.

176{CF_CLIENT | CF_ARCHIVE, "v_color_enable", "0", "enables black-grey-white color correction curve controls"};

Referenced by M_Menu_Options_ColorControl_AdjustSliders(), M_Options_ColorControl_Draw(), M_Options_ColorControl_Key(), VID_Shared_Init(), and VID_UpdateGamma().

◆ v_color_grey_b

cvar_t v_color_grey_b = {CF_CLIENT | CF_ARCHIVE, "v_color_grey_b", "0.5", "desired color of grey"}

Definition at line 182 of file vid_shared.c.

182{CF_CLIENT | CF_ARCHIVE, "v_color_grey_b", "0.5", "desired color of grey"};

Referenced by M_Menu_Options_ColorControl_AdjustSliders(), M_Options_ColorControl_Draw(), M_Options_ColorControl_Key(), VID_Shared_Init(), and VID_UpdateGamma().

◆ v_color_grey_g

cvar_t v_color_grey_g = {CF_CLIENT | CF_ARCHIVE, "v_color_grey_g", "0.5", "desired color of grey"}

Definition at line 181 of file vid_shared.c.

181{CF_CLIENT | CF_ARCHIVE, "v_color_grey_g", "0.5", "desired color of grey"};

Referenced by M_Menu_Options_ColorControl_AdjustSliders(), M_Options_ColorControl_Draw(), M_Options_ColorControl_Key(), VID_Shared_Init(), and VID_UpdateGamma().

◆ v_color_grey_r

cvar_t v_color_grey_r = {CF_CLIENT | CF_ARCHIVE, "v_color_grey_r", "0.5", "desired color of grey"}

Definition at line 180 of file vid_shared.c.

180{CF_CLIENT | CF_ARCHIVE, "v_color_grey_r", "0.5", "desired color of grey"};

Referenced by M_Menu_Options_ColorControl_AdjustSliders(), M_Options_ColorControl_Draw(), M_Options_ColorControl_Key(), VID_Shared_Init(), and VID_UpdateGamma().

◆ v_color_white_b

cvar_t v_color_white_b = {CF_CLIENT | CF_ARCHIVE, "v_color_white_b", "1", "desired color of white"}

Definition at line 185 of file vid_shared.c.

185{CF_CLIENT | CF_ARCHIVE, "v_color_white_b", "1", "desired color of white"};

Referenced by M_Menu_Options_ColorControl_AdjustSliders(), M_Options_ColorControl_Draw(), M_Options_ColorControl_Key(), VID_Shared_Init(), and VID_UpdateGamma().

◆ v_color_white_g

cvar_t v_color_white_g = {CF_CLIENT | CF_ARCHIVE, "v_color_white_g", "1", "desired color of white"}

Definition at line 184 of file vid_shared.c.

184{CF_CLIENT | CF_ARCHIVE, "v_color_white_g", "1", "desired color of white"};

Referenced by M_Menu_Options_ColorControl_AdjustSliders(), M_Options_ColorControl_Draw(), M_Options_ColorControl_Key(), VID_Shared_Init(), and VID_UpdateGamma().

◆ v_color_white_r

cvar_t v_color_white_r = {CF_CLIENT | CF_ARCHIVE, "v_color_white_r", "1", "desired color of white"}

Definition at line 183 of file vid_shared.c.

183{CF_CLIENT | CF_ARCHIVE, "v_color_white_r", "1", "desired color of white"};

Referenced by M_Menu_Options_ColorControl_AdjustSliders(), M_Options_ColorControl_Draw(), M_Options_ColorControl_Key(), VID_Shared_Init(), and VID_UpdateGamma().

◆ v_contrast

cvar_t v_contrast = {CF_CLIENT | CF_ARCHIVE, "v_contrast", "1", "brightness of white (values above 1 give a brighter image with increased color saturation, unlike v_gamma)"}

Definition at line 173 of file vid_shared.c.

173{CF_CLIENT | CF_ARCHIVE, "v_contrast", "1", "brightness of white (values above 1 give a brighter image with increased color saturation, unlike v_gamma)"};

Referenced by M_Menu_Options_AdjustSliders(), M_Menu_Options_ColorControl_AdjustSliders(), M_Options_ColorControl_Draw(), M_Options_ColorControl_Key(), M_Options_Draw(), VID_Shared_Init(), and VID_UpdateGamma().

◆ v_contrastboost

cvar_t v_contrastboost = {CF_CLIENT | CF_ARCHIVE, "v_contrastboost", "1", "by how much to multiply the contrast in dark areas (1 is no change)"}

Definition at line 175 of file vid_shared.c.

175{CF_CLIENT | CF_ARCHIVE, "v_contrastboost", "1", "by how much to multiply the contrast in dark areas (1 is no change)"};

Referenced by VID_Shared_Init(), and VID_UpdateGamma().

◆ v_gamma

cvar_t v_gamma = {CF_CLIENT | CF_ARCHIVE, "v_gamma", "1", "inverse gamma correction value, a brightness effect that does not affect white or black, and tends to make the image grey and dull"}

Definition at line 172 of file vid_shared.c.

172{CF_CLIENT | CF_ARCHIVE, "v_gamma", "1", "inverse gamma correction value, a brightness effect that does not affect white or black, and tends to make the image grey and dull"};

Referenced by M_Menu_Options_AdjustSliders(), M_Menu_Options_ColorControl_AdjustSliders(), M_Options_ColorControl_Draw(), M_Options_ColorControl_Key(), M_Options_Draw(), VID_Shared_Init(), and VID_UpdateGamma().

◆ v_glslgamma_2d

cvar_t v_glslgamma_2d = {CF_CLIENT | CF_ARCHIVE, "v_glslgamma_2d", "1", "applies GLSL gamma to 2d pictures (HUD, fonts)"}

Definition at line 186 of file vid_shared.c.

186{CF_CLIENT | CF_ARCHIVE, "v_glslgamma_2d", "1", "applies GLSL gamma to 2d pictures (HUD, fonts)"};

Referenced by R_SetupShader_Generic(), and VID_Shared_Init().

◆ v_psycho

cvar_t v_psycho = {CF_CLIENT, "v_psycho", "0", "easter egg - R.I.P. zinx http://obits.al.com/obituaries/birmingham/obituary.aspx?n=christopher-robert-lais&pid=186080667"}

Definition at line 187 of file vid_shared.c.

187{CF_CLIENT, "v_psycho", "0", "easter egg - R.I.P. zinx http://obits.al.com/obituaries/birmingham/obituary.aspx?n=christopher-robert-lais&pid=186080667"};

Referenced by VID_BuildGammaTables(), VID_Shared_Init(), and VID_UpdateGamma().

◆ value

GLsizei GLboolean const GLfloat* value

Definition at line 345 of file vid_shared.c.

Referenced by VID_JoyState_GetAxis().

◆ vid

viddef_t vid

global video state

Definition at line 64 of file vid_shared.c.

Referenced by CL_DrawVideo(), CL_Input(), CL_NewParticle(), CL_SpawnDecalParticleForSurface(), CL_UpdateScreen(), CL_VM_UpdateView(), Draw_NewPic(), DrawQ_Line(), DrawQ_SetClipArea(), DrawQ_Start(), DrawQ_String_Scale(), Font_IndexForSize(), Font_VirtualToRealSize(), GL_ActiveTexture(), GL_AlphaToCoverage(), gl_backend_devicelost(), gl_backend_devicerestored(), GL_Backend_ResetState(), gl_backend_shutdown(), gl_backend_start(), GL_BlendEquationSubtract(), GL_BlendFunc(), GL_Clear(), GL_Color(), GL_ColorMask(), GL_CullFace(), GL_DepthFunc(), GL_DepthMask(), GL_DepthRange(), GL_DepthTest(), GL_Finish(), gl_main_shutdown(), gl_main_start(), GL_PolygonOffset(), GL_ReadPixelsBGRA(), GL_Scissor(), GL_ScissorTest(), GL_SetMirrorState(), GL_Setup(), GL_SetupTextureParameters(), GL_Texture_CalcImageSize(), GL_TextureMode_f(), IN_Move(), IN_Move_TouchScreen_Quake(), M_Menu_Video_AdjustSliders(), M_Menu_Video_f(), M_Options_ColorControl_Draw(), M_Video_Draw(), M_Video_Key(), Mod_GenerateLightmaps_CreateLightmaps(), Mod_Q1BSP_LoadFaces(), Mod_Q1BSP_LoadSplitSky(), Mod_Q3BSP_Load(), Mod_Q3BSP_LoadLightGrid(), Mod_Q3BSP_LoadLightmaps(), Mod_Q3BSP_LoadVertices(), Mod_VBSP_LoadFaces(), MP_Draw(), MR_Init(), R_BeginCoronaQuery(), R_BlendView(), R_Bloom_StartFrame(), R_BuildLightMap(), R_ClearScreen(), R_DebugLine(), R_DrawCorona(), R_DrawModelTextureSurfaceList(), R_EntityMatrix(), R_Envmap_f(), R_FreeTexture(), R_GetCurrentTexture(), R_GetTexTypeInfo(), R_GLSL_CompilePermutation(), R_GLSL_Restart_f(), R_InitParticleTexture(), R_LoadCubemap(), R_LoadSkyBox(), R_LoadTextureDDSFile(), R_LoadTextureRenderBuffer(), R_Mesh_ColorPointer(), R_Mesh_CopyToTexture(), R_Mesh_CreateFramebufferObject(), R_Mesh_DestroyFramebufferObject(), R_Mesh_DestroyMeshBuffer(), R_Mesh_Draw(), R_Mesh_SetRenderTargets(), R_Mesh_TexBind(), R_Mesh_TexCoordPointer(), R_Mesh_UpdateMeshBuffer(), R_Mesh_VertexPointer(), R_RenderView(), R_ResetViewRendering2D_Common(), R_ResetViewRendering3D(), R_ScissorForBBox(), R_SetStencil(), R_SetupShader_DeferredLight(), R_SetupShader_DepthOrShadow(), R_SetupShader_Generic(), R_SetupShader_Surface(), R_SetupTexture(), R_SetupView(), R_SetViewport(), R_Shadow_BounceGrid_UpdateSpacing(), R_Shadow_ClearShadowMapTexture(), R_Shadow_DrawCoronas(), R_Shadow_PrepareLights(), R_Shadow_RenderMode_ShadowMap(), R_Shadow_SetShadowMode(), r_shadow_start(), R_SkinFrame_GenerateTexturesFromQPixels(), R_SkinFrame_LoadExternal_SkinFrame(), R_Stereo_Active(), r_textures_devicelost(), r_textures_devicerestored(), R_Textures_Frame(), r_textures_start(), R_UpdateVariables(), R_UploadFullTexture(), R_UploadPartialTexture(), R_Viewport_InitOrtho(), R_Water_StartFrame(), SCR_CaptureVideo_Avi_BeginVideo(), SCR_DrawLoadingScreen(), SCR_DrawScreen(), SCR_ScreenShot_f(), SCR_SetLoadingScreenTexture(), SCR_UpdateVars(), snap_to_pixel_x(), snap_to_pixel_y(), Sys_SDL_HandleEvents(), V_CalcViewBlend(), VID_ApplyDisplayMode(), VID_BuildGammaTables(), VID_ClearExtensions(), VID_Finish(), VID_GetDesktopMode(), VID_InitModeGL(), VID_ListModes(), VID_Mode(), VID_Restart_f(), VID_UpdateGamma(), VM_CL_getmousepos(), VM_CL_R_SetView(), and VM_M_getmousepos().

◆ vid_activewindow

◆ vid_bitsperpixel

cvar_t vid_bitsperpixel = {CF_CLIENT | CF_READONLY, "vid_bitsperpixel", "32", "how many bits per pixel to render at (this is not currently configurable)"}

Definition at line 138 of file vid_shared.c.

138{CF_CLIENT | CF_READONLY, "vid_bitsperpixel", "32", "how many bits per pixel to render at (this is not currently configurable)"};

Referenced by M_Video_Key(), VID_ApplyDisplayMode_c(), VID_Mode(), VID_Restart_f(), and VID_Shared_Init().

◆ vid_borderless

cvar_t vid_borderless = {CF_CLIENT | CF_ARCHIVE, "vid_borderless", "0", "make the window borderless by removing all window decorations. has no effect in fullscreen mode"}

Definition at line 135 of file vid_shared.c.

135{CF_CLIENT | CF_ARCHIVE, "vid_borderless", "0", "make the window borderless by removing all window decorations. has no effect in fullscreen mode"};

Referenced by VID_ApplyDisplayMode(), VID_Init(), VID_InitModeGL(), VID_Shared_Init(), and VID_Start().

◆ vid_commandlinecheck

qbool vid_commandlinecheck = true

Definition at line 1464 of file vid_shared.c.

Referenced by VID_Restart_f(), and VID_Start().

◆ vid_desktopfullscreen

cvar_t vid_desktopfullscreen = {CF_CLIENT | CF_ARCHIVE, "vid_desktopfullscreen", "1", "force desktop resolution and refresh rate (disable modesetting), also use some OS-dependent tricks for better fullscreen integration; disabling may reveal OS/driver/SDL bugs with multi-monitor configurations"}

Definition at line 165 of file vid_shared.c.

165{CF_CLIENT | CF_ARCHIVE, "vid_desktopfullscreen", "1", "force desktop resolution and refresh rate (disable modesetting), also use some OS-dependent tricks for better fullscreen integration; disabling may reveal OS/driver/SDL bugs with multi-monitor configurations"};

Referenced by M_Menu_Video_AdjustSliders(), M_Video_Draw(), M_Video_Key(), VID_ApplyDisplayMode_c(), VID_Init(), VID_Mode(), VID_Restart_f(), and VID_Shared_Init().

◆ vid_display

cvar_t vid_display = {CF_CLIENT | CF_ARCHIVE, "vid_display", "0", "which monitor to render on, numbered from 0 (system default)" }

Definition at line 166 of file vid_shared.c.

166{CF_CLIENT | CF_ARCHIVE, "vid_display", "0", "which monitor to render on, numbered from 0 (system default)" };

Referenced by M_Menu_Video_AdjustSliders(), M_Video_Draw(), M_Video_Key(), VID_ApplyDisplayMode_c(), VID_Init(), VID_Mode(), VID_Restart_f(), and VID_Shared_Init().

◆ vid_fullscreen

cvar_t vid_fullscreen = {CF_CLIENT | CF_ARCHIVE, "vid_fullscreen", "1", "use fullscreen (1) or windowed (0)"}

Definition at line 134 of file vid_shared.c.

134{CF_CLIENT | CF_ARCHIVE, "vid_fullscreen", "1", "use fullscreen (1) or windowed (0)"};

Referenced by em_on_resize(), M_Menu_Video_AdjustSliders(), M_Video_Draw(), M_Video_Key(), MR_Init(), VID_ApplyDisplayMode_c(), VID_Init(), VID_Mode(), VID_Restart_f(), VID_Shared_Init(), and VID_Start().

◆ vid_gammatables_serial

unsigned int vid_gammatables_serial = 0

so other subsystems can poll if gamma parameters have changed; this starts with 0 and gets increased by 1 each time the gamma parameters get changed and VID_BuildGammaTables should be called again

Definition at line 1115 of file vid_shared.c.

Referenced by R_UpdateVariables(), and VID_UpdateGamma().

◆ vid_gammatables_trivial

qbool vid_gammatables_trivial = true

this is set to true if all color control values are at default setting, and it therefore would make no sense to use the gamma table

Definition at line 1116 of file vid_shared.c.

Referenced by R_BlendView(), R_BlendView_IsTrivial(), R_SetupShader_Generic(), R_UpdateVariables(), and VID_UpdateGamma().

◆ vid_grabkeyboard

cvar_t vid_grabkeyboard = {CF_CLIENT | CF_ARCHIVE, "vid_grabkeyboard", "0", "whether to grab the keyboard when mouse is active (prevents use of volume control keys, music player keys, etc on some keyboards)"}

Definition at line 153 of file vid_shared.c.

153{CF_CLIENT | CF_ARCHIVE, "vid_grabkeyboard", "0", "whether to grab the keyboard when mouse is active (prevents use of volume control keys, music player keys, etc on some keyboards)"};

Referenced by VID_Shared_Init().

◆ vid_height

cvar_t vid_height = {CF_CLIENT | CF_ARCHIVE, "vid_height", "480", "resolution"}

◆ vid_hidden

qbool vid_hidden = true

◆ vid_info_displaycount

cvar_t vid_info_displaycount = {CF_CLIENT | CF_READONLY, "vid_info_displaycount", "1", "how many monitors are currently available, updated by hotplug events" }

Definition at line 167 of file vid_shared.c.

167{CF_CLIENT | CF_READONLY, "vid_info_displaycount", "1", "how many monitors are currently available, updated by hotplug events" };

Referenced by M_Menu_Video_AdjustSliders(), M_Video_Draw(), Sys_SDL_HandleEvents(), VID_ApplyDisplayMode(), VID_InitModeGL(), and VID_Shared_Init().

◆ vid_joybuttontimer

double vid_joybuttontimer[MAXJOYBUTTON]

Definition at line 1012 of file vid_shared.c.

Referenced by VID_ApplyJoyState().

◆ vid_joystate

vid_joystate_t vid_joystate

Definition at line 79 of file vid_shared.c.

Referenced by VID_ApplyJoyState(), and VID_JoyBlockEmulatedKeys().

◆ vid_minheight

cvar_t vid_minheight = {CF_CLIENT, "vid_minheight", "0", "minimum vid_height that is acceptable (to be set in default.cfg in mods)"}

Definition at line 155 of file vid_shared.c.

155{CF_CLIENT, "vid_minheight", "0", "minimum vid_height that is acceptable (to be set in default.cfg in mods)"};

Referenced by M_Menu_Video_AdjustSliders(), and VID_Shared_Init().

◆ vid_minimize_on_focus_loss

cvar_t vid_minimize_on_focus_loss = {CF_CLIENT | CF_ARCHIVE, "vid_minimize_on_focus_loss", "0", "whether to minimize the fullscreen window if it loses focus (such as by alt+tab)"}

Definition at line 152 of file vid_shared.c.

152{CF_CLIENT | CF_ARCHIVE, "vid_minimize_on_focus_loss", "0", "whether to minimize the fullscreen window if it loses focus (such as by alt+tab)"};

Referenced by VID_Init(), VID_SetHints_c(), and VID_Shared_Init().

◆ vid_minwidth

cvar_t vid_minwidth = {CF_CLIENT, "vid_minwidth", "0", "minimum vid_width that is acceptable (to be set in default.cfg in mods)"}

Definition at line 154 of file vid_shared.c.

154{CF_CLIENT, "vid_minwidth", "0", "minimum vid_width that is acceptable (to be set in default.cfg in mods)"};

Referenced by M_Menu_Video_AdjustSliders(), and VID_Shared_Init().

◆ vid_mouse

cvar_t vid_mouse = {CF_CLIENT | CF_ARCHIVE, "vid_mouse", "1", "whether to use the mouse in windowed mode (fullscreen always does)"}

Definition at line 150 of file vid_shared.c.

150{CF_CLIENT | CF_ARCHIVE, "vid_mouse", "1", "whether to use the mouse in windowed mode (fullscreen always does)"};

Referenced by Sys_SDL_HandleEvents(), and VID_Shared_Init().

◆ vid_mouse_clickthrough

cvar_t vid_mouse_clickthrough = {CF_CLIENT | CF_ARCHIVE, "vid_mouse_clickthrough", "0", "mouse behavior in windowed mode: 0 = click to focus, 1 = allow interaction even if the window is not focused (click-through behaviour, can be useful when using third-party game overlays)"}

Definition at line 151 of file vid_shared.c.

151{CF_CLIENT | CF_ARCHIVE, "vid_mouse_clickthrough", "0", "mouse behavior in windowed mode: 0 = click to focus, 1 = allow interaction even if the window is not focused (click-through behaviour, can be useful when using third-party game overlays)"};

Referenced by VID_Init(), VID_SetHints_c(), and VID_Shared_Init().

◆ vid_opened

qbool vid_opened
extern

Definition at line 2785 of file cl_main.c.

Referenced by CL_StartVideo().

◆ vid_refreshrate

cvar_t vid_refreshrate = {CF_CLIENT | CF_ARCHIVE, "vid_refreshrate", "0", "refresh rate to use, in hz (higher values feel smoother, if supported by your monitor), 0 uses the default"}

Definition at line 140 of file vid_shared.c.

140{CF_CLIENT | CF_ARCHIVE, "vid_refreshrate", "0", "refresh rate to use, in hz (higher values feel smoother, if supported by your monitor), 0 uses the default"};

Referenced by M_Menu_Video_AdjustSliders(), M_Video_Draw(), M_Video_Key(), VID_ApplyDisplayMode_c(), VID_Init(), VID_Mode(), VID_Restart_f(), and VID_Shared_Init().

◆ vid_resizable

cvar_t vid_resizable = {CF_CLIENT | CF_ARCHIVE, "vid_resizable", "1", "0: window not resizable, 1: resizable, 2: window can be resized but the framebuffer isn't adjusted" }

Definition at line 164 of file vid_shared.c.

164{CF_CLIENT | CF_ARCHIVE, "vid_resizable", "1", "0: window not resizable, 1: resizable, 2: window can be resized but the framebuffer isn't adjusted" };

Referenced by em_on_resize(), Sys_SDL_HandleEvents(), VID_ApplyDisplayMode(), VID_Init(), VID_InitModeGL(), and VID_Shared_Init().

◆ vid_samples

cvar_t vid_samples = {CF_CLIENT | CF_ARCHIVE, "vid_samples", "1", "how many anti-aliasing samples per pixel to request from the graphics driver (4 is recommended, 1 is faster)"}

Definition at line 139 of file vid_shared.c.

139{CF_CLIENT | CF_ARCHIVE, "vid_samples", "1", "how many anti-aliasing samples per pixel to request from the graphics driver (4 is recommended, 1 is faster)"};

Referenced by M_Menu_Video_AdjustSliders(), M_Video_Draw(), M_Video_Key(), and VID_Shared_Init().

◆ vid_sRGB

cvar_t vid_sRGB = {CF_CLIENT | CF_ARCHIVE, "vid_sRGB", "0", "if hardware is capable, modify rendering to be gamma corrected for the sRGB color standard (computer monitors, TVs), recommended"}

Definition at line 157 of file vid_shared.c.

157{CF_CLIENT | CF_ARCHIVE, "vid_sRGB", "0", "if hardware is capable, modify rendering to be gamma corrected for the sRGB color standard (computer monitors, TVs), recommended"};

Referenced by Mod_Q3BSP_Load(), Mod_Q3BSP_LoadLightGrid(), Mod_Q3BSP_LoadLightmaps(), Mod_Q3BSP_LoadVertices(), R_BuildLightMap(), R_RenderView(), VID_Mode(), and VID_Shared_Init().

◆ vid_sRGB_fallback

cvar_t vid_sRGB_fallback = {CF_CLIENT | CF_ARCHIVE, "vid_sRGB_fallback", "0", "do an approximate sRGB fallback if not properly supported by hardware (2: also use the fallback if framebuffer is 8bit, 3: always use the fallback even if sRGB is supported)"}

Definition at line 158 of file vid_shared.c.

158{CF_CLIENT | CF_ARCHIVE, "vid_sRGB_fallback", "0", "do an approximate sRGB fallback if not properly supported by hardware (2: also use the fallback if framebuffer is 8bit, 3: always use the fallback even if sRGB is supported)"};

Referenced by Mod_Q3BSP_Load(), Mod_Q3BSP_LoadLightGrid(), Mod_Q3BSP_LoadLightmaps(), Mod_Q3BSP_LoadVertices(), R_BuildLightMap(), R_RenderView(), VID_Mode(), and VID_Shared_Init().

◆ vid_stereobuffer

cvar_t vid_stereobuffer = {CF_CLIENT | CF_ARCHIVE, "vid_stereobuffer", "0", "enables 'quad-buffered' stereo rendering for stereo shutterglasses, HMD (head mounted display) devices, or polarized stereo LCDs, if supported by your drivers"}

Definition at line 141 of file vid_shared.c.

141{CF_CLIENT | CF_ARCHIVE, "vid_stereobuffer", "0", "enables 'quad-buffered' stereo rendering for stereo shutterglasses, HMD (head mounted display) devices, or polarized stereo LCDs, if supported by your drivers"};

Referenced by VID_Mode(), VID_Restart_f(), and VID_Shared_Init().

◆ vid_stick_mouse

cvar_t vid_stick_mouse = {CF_CLIENT | CF_ARCHIVE, "vid_stick_mouse", "0", "have the mouse stuck in the center of the screen" }

Definition at line 163 of file vid_shared.c.

163{CF_CLIENT | CF_ARCHIVE, "vid_stick_mouse", "0", "have the mouse stuck in the center of the screen" };

Referenced by IN_Move(), and VID_Shared_Init().

◆ vid_touchscreen

cvar_t vid_touchscreen = {CF_CLIENT, "vid_touchscreen", "0", "Use touchscreen-style input (no mouse grab, track mouse motion only while button is down, screen areas for mimicing joystick axes and buttons"}

Definition at line 160 of file vid_shared.c.

160{CF_CLIENT, "vid_touchscreen", "0", "Use touchscreen-style input (no mouse grab, track mouse motion only while button is down, screen areas for mimicing joystick axes and buttons"};

Referenced by IN_Move(), Sys_SDL_HandleEvents(), VID_Init(), VID_Mode(), and VID_Shared_Init().

◆ vid_touchscreen_density

cvar_t vid_touchscreen_density = {CF_CLIENT, "vid_touchscreen_density", "2.0", "Standard quantized screen density multiplier (see Android documentation for DisplayMetrics), similar values are given on iPhoneOS"}

Definition at line 145 of file vid_shared.c.

145{CF_CLIENT, "vid_touchscreen_density", "2.0", "Standard quantized screen density multiplier (see Android documentation for DisplayMetrics), similar values are given on iPhoneOS"};

Referenced by IN_Move_TouchScreen_SteelStorm(), VID_Shared_Init(), and VID_Start().

◆ vid_touchscreen_showkeyboard

cvar_t vid_touchscreen_showkeyboard = {CF_CLIENT, "vid_touchscreen_showkeyboard", "0", "shows the platform's screen keyboard for text entry, can be set by csqc or menu qc if it wants to receive text input, does nothing if the platform has no screen keyboard"}

Definition at line 161 of file vid_shared.c.

161{CF_CLIENT, "vid_touchscreen_showkeyboard", "0", "shows the platform's screen keyboard for text entry, can be set by csqc or menu qc if it wants to receive text input, does nothing if the platform has no screen keyboard"};

Referenced by IN_Move(), and VID_Shared_Init().

◆ vid_touchscreen_supportshowkeyboard

cvar_t vid_touchscreen_supportshowkeyboard = {CF_CLIENT | CF_READONLY, "vid_touchscreen_supportshowkeyboard", "0", "indicates if the platform supports a virtual keyboard"}

Definition at line 162 of file vid_shared.c.

162{CF_CLIENT | CF_READONLY, "vid_touchscreen_supportshowkeyboard", "0", "indicates if the platform supports a virtual keyboard"};

Referenced by VID_InitMode(), and VID_Shared_Init().

◆ vid_touchscreen_xdpi

cvar_t vid_touchscreen_xdpi = {CF_CLIENT, "vid_touchscreen_xdpi", "300", "Horizontal DPI of the screen (only valid on Android currently)"}

Definition at line 146 of file vid_shared.c.

146{CF_CLIENT, "vid_touchscreen_xdpi", "300", "Horizontal DPI of the screen (only valid on Android currently)"};

Referenced by VID_Shared_Init(), and VID_Start().

◆ vid_touchscreen_ydpi

cvar_t vid_touchscreen_ydpi = {CF_CLIENT, "vid_touchscreen_ydpi", "300", "Vertical DPI of the screen (only valid on Android currently)"}

Definition at line 147 of file vid_shared.c.

147{CF_CLIENT, "vid_touchscreen_ydpi", "300", "Vertical DPI of the screen (only valid on Android currently)"};

Referenced by VID_Shared_Init(), and VID_Start().

◆ vid_vsync

cvar_t vid_vsync = {CF_CLIENT | CF_ARCHIVE, "vid_vsync", "0", "sync to vertical blank, prevents 'tearing' (seeing part of one frame and part of another on the screen at the same time) at the cost of latency, >= 1 always syncs and <= -1 is adaptive (stops syncing if the framerate drops, unsupported by some platforms), automatically disabled when doing timedemo benchmarks"}

Definition at line 149 of file vid_shared.c.

149{CF_CLIENT | CF_ARCHIVE, "vid_vsync", "0", "sync to vertical blank, prevents 'tearing' (seeing part of one frame and part of another on the screen at the same time) at the cost of latency, >= 1 always syncs and <= -1 is adaptive (stops syncing if the framerate drops, unsupported by some platforms), automatically disabled when doing timedemo benchmarks"};

Referenced by CL_DisconnectEx(), CL_FinishTimeDemo(), CL_TimeDemo_f(), M_Menu_Video_AdjustSliders(), M_Video_Draw(), Sys_Frame(), VID_Init(), VID_InitModeGL(), VID_SetVsync_c(), and VID_Shared_Init().

◆ vid_width

cvar_t vid_width = {CF_CLIENT | CF_ARCHIVE, "vid_width", "640", "resolution"}

◆ vidfallbacks

struct vidfallback_s vidfallbacks[]
static
Initial value:
=
{
{&vid_samples, "1"},
{&vid_refreshrate, "0"},
{&vid_width, "640"},
{&vid_height, "480"},
{&vid_bitsperpixel, "32"},
}

Definition at line 1521 of file vid_shared.c.

1522{
1523 {&vid_stereobuffer, "0"},
1524 {&vid_samples, "1"},
1525 {&vid_refreshrate, "0"},
1526 {&vid_width, "640"},
1527 {&vid_height, "480"},
1528 {&vid_bitsperpixel, "32"},
1529 {NULL, NULL}
1530};

Referenced by VID_Start().

◆ w

Definition at line 387 of file vid_shared.c.

◆ width

GLint GLsizei width

Definition at line 226 of file vid_shared.c.

Referenced by VID_SortModes(), and VID_Start().

◆ x

Definition at line 256 of file vid_shared.c.

Referenced by VID_BuildGammaTables().

◆ xoffset

GLint GLint xoffset

Definition at line 254 of file vid_shared.c.

◆ y

GLint y

Definition at line 256 of file vid_shared.c.

Referenced by VID_BuildGammaTables().

◆ yoffset

GLint GLint GLint yoffset

Definition at line 254 of file vid_shared.c.

◆ z

Definition at line 387 of file vid_shared.c.

◆ zfail

GLenum zfail

Definition at line 336 of file vid_shared.c.

◆ zoffset

Definition at line 255 of file vid_shared.c.

◆ zpass

GLenum GLenum zpass

Definition at line 336 of file vid_shared.c.