MCPcopy Create free account
hub / github.com/demoth/jake2 / VID

Class VID

client/src/main/java/jake2/client/VID.java:48–731  ·  view source on GitHub ↗

VID is a video driver. source: client/vid.h linux/vid_so.c @author cwei

Source from the content-addressed store, hash-verified

46 * @author cwei
47 */
48public class VID extends Globals {
49 // Main windowed and fullscreen graphics interface module. This module
50 // is used for both the software and OpenGL rendering versions of the
51 // Quake refresh engine.
52
53 // Global variables used internally by this module
54 // Globals.viddef
55 // global video state; used by other modules
56
57 // Structure containing functions exported from refresh DLL
58 // Globals.re;
59
60 // Console variables that we need to access from this module
61 static cvar_t vid_gamma;
62 static cvar_t vid_ref; // Name of Refresh DLL loaded
63 static cvar_t vid_xpos; // X coordinate of window position
64 static cvar_t vid_ypos; // Y coordinate of window position
65 static cvar_t vid_width;
66 static cvar_t vid_height;
67 static cvar_t vid_fullscreen;
68
69 // Global variables used internally by this module
70 // void *reflib_library; // Handle to refresh DLL
71 static boolean reflib_active = false;
72 // const char so_file[] = "/etc/quake2.conf";
73
74 /*
75 ============
76 VID_Restart_f
77
78 Console command to re-start the video mode and refresh DLL. We do this
79 simply by setting the modified flag for the vid_ref variable, which will
80 cause the entire video mode and refresh DLL to be reset on the next frame.
81 ============
82 */
83 static void Restart_f() {
84 vid_modes[11].width = (int) vid_width.value;
85 vid_modes[11].height = (int) vid_height.value;
86
87 vid_ref.modified = true;
88 }
89
90 /*
91 ** VID_GetModeInfo
92 */
93 static vidmode_t vid_modes[] =
94 {
95 new vidmode_t("Mode 0: 320x240", 320, 240, 0),
96 new vidmode_t("Mode 1: 400x300", 400, 300, 1),
97 new vidmode_t("Mode 2: 512x384", 512, 384, 2),
98 new vidmode_t("Mode 3: 640x480", 640, 480, 3),
99 new vidmode_t("Mode 4: 800x600", 800, 600, 4),
100 new vidmode_t("Mode 5: 960x720", 960, 720, 5),
101 new vidmode_t("Mode 6: 1024x768", 1024, 768, 6),
102 new vidmode_t("Mode 7: 1152x864", 1152, 864, 7),
103 new vidmode_t("Mode 8: 1280x1024", 1280, 1024, 8),
104 new vidmode_t("Mode 9: 1600x1200", 1600, 1200, 9),
105 new vidmode_t("Mode 10: 2048x1536", 2048, 1536, 10),

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected