2 Copyright (C) 1996-1997 Id Software, Inc.
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License
6 as published by the Free Software Foundation; either version 2
7 of the License, or (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 See the GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 // vid.h -- video driver defs
25 extern int cl_available;
29 // these are set with VID_GetWindowSize and can change from frame to frame
41 extern void (*vid_menudrawfn)(void);
42 extern void (*vid_menukeyfn)(int key);
44 extern int vid_hidden;
45 extern int vid_activewindow;
47 extern cvar_t vid_fullscreen;
48 extern cvar_t vid_width;
49 extern cvar_t vid_height;
50 extern cvar_t vid_bitsperpixel;
51 extern cvar_t vid_mouse;
53 // brand of graphics chip
54 extern const char *gl_vendor;
55 // graphics chip model and other information
56 extern const char *gl_renderer;
57 // begins with 1.0.0, 1.1.0, 1.2.0, 1.2.1, 1.3.0, 1.3.1, or 1.4.0
58 extern const char *gl_version;
59 // extensions list, space separated
60 extern const char *gl_extensions;
62 extern const char *gl_platform;
63 // another extensions list, containing platform-specific extensions that are
64 // not in the main list
65 extern const char *gl_platformextensions;
66 // name of driver library (opengl32.dll, libGL.so.1, or whatever)
67 extern char gl_driver[256];
69 // compatibility hacks
70 extern qboolean isG200;
71 extern qboolean isRagePro;
73 // LordHavoc: GLX_SGI_video_sync and WGL_EXT_swap_control
74 extern int gl_videosyncavailable;
81 gl_extensionfunctionlist_t;
86 const gl_extensionfunctionlist_t *funcs;
88 const char *disableparm;
92 int GL_OpenLibrary(const char *name);
93 void GL_CloseLibrary(void);
94 void *GL_GetProcAddress(const char *name);
95 int GL_CheckExtension(const char *name, const gl_extensionfunctionlist_t *funcs, const char *disableparm, int silent);
97 double VID_CompareMode(int width1, int height1, int bpp1, int width2, int height2, int bpp2);
99 void VID_InitCvars(void);
103 void VID_CheckExtensions(void);
105 void VID_Init (void);
106 int VID_Mode(int fullscreen, int width, int height, int bpp);
109 void VID_Shutdown (void);
110 // Called at shutdown
112 int VID_SetMode (int modenum);
113 // sets the mode; only used by the Quake engine for resetting to mode 0 (the
114 // base mode) on memory allocation failures
116 // sets hardware gamma correction, returns false if the device does not
117 // support gamma control
118 int VID_SetGamma (float prescale, float gamma, float scale, float base);
120 void VID_GetWindowSize (int *x, int *y, int *width, int *height);
122 void VID_Finish (void);