extern cvar_t gl_info_renderer;
extern cvar_t gl_info_version;
extern cvar_t gl_info_extensions;
-extern cvar_t gl_info_driver;
/// brand of graphics chip
extern const char *gl_vendor;
{
int windowflags = SDL_WINDOW_SHOWN | SDL_WINDOW_OPENGL;
int i;
- // SDL usually knows best
- const char *drivername = NULL;
// video display selection (multi-monitor)
Cvar_SetValueQuick(&vid_info_displaycount, SDL_GetNumVideoDisplays());
if(vid_resizable.integer)
windowflags |= SDL_WINDOW_RESIZABLE;
-#ifndef USE_GLES2
-// COMMANDLINEOPTION: SDL GL: -gl_driver <drivername> selects a GL driver library, default is whatever SDL recommends, useful only for 3dfxogl.dll/3dfxvgl.dll or fxmesa or similar, if you don't know what this is for, you don't need it
- i = Sys_CheckParm("-gl_driver");
- if (i && i < sys.argc - 1)
- drivername = sys.argv[i + 1];
- if (SDL_GL_LoadLibrary(drivername) < 0)
- {
- Con_Printf(CON_ERROR "Unable to load GL driver \"%s\": %s\n", drivername, SDL_GetError());
- return false;
- }
-#endif
-
#ifdef DP_MOBILETOUCH
// mobile platforms are always fullscreen, we'll get the resolution after opening the window
mode->fullscreen = true;
Cvar_SetQuick(&gl_info_vendor, gl_vendor);
Cvar_SetQuick(&gl_info_renderer, gl_renderer);
Cvar_SetQuick(&gl_info_version, gl_version);
- Cvar_SetQuick(&gl_info_driver, drivername ? drivername : "");
for (i = 0; i < vid_info_displaycount.integer; ++i)
Con_Printf("Display %i: %s\n", i, SDL_GetDisplayName(i));
cvar_t gl_info_renderer = {CF_CLIENT | CF_READONLY, "gl_info_renderer", "", "indicates graphics chip model and other information"};
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."};
cvar_t gl_info_extensions = {CF_CLIENT | CF_READONLY, "gl_info_extensions", "", "indicates extension list found by engine, space separated."};
-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 vid_fullscreen = {CF_CLIENT | CF_ARCHIVE, "vid_fullscreen", "1", "use fullscreen (1) or windowed (0)"};
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"};
Cvar_RegisterVariable(&gl_info_renderer);
Cvar_RegisterVariable(&gl_info_version);
Cvar_RegisterVariable(&gl_info_extensions);
- Cvar_RegisterVariable(&gl_info_driver);
Cvar_RegisterVariable(&v_gamma);
Cvar_RegisterVariable(&v_brightness);
Cvar_RegisterVariable(&v_contrastboost);