return false;
}
+#ifndef USE_GLES2
for (func = openglfuncs; func && func->name != NULL; func++)
{
if (!*func->funcvariable && !strcmp(name, func->extension))
failed = true;
}
}
+#endif //USE_GLES2
// delay the return so it prints all missing functions
if (failed)
return false;
void GL_Setup(void)
{
char *s;
+ int j;
+ GLint numextensions = 0;
const glfunction_t *func;
qboolean missingrequiredfuncs = false;
static char missingfuncs[16384];
Con_Printf("GL_RENDERER: %s\n", gl_renderer);
Con_Printf("GL_VERSION: %s\n", gl_version);
- if (developer.integer)
+#ifndef USE_GLES2
+ qglGetIntegerv(GL_NUM_EXTENSIONS, &numextensions);
+ Con_DPrint("GL_EXTENSIONS:\n");
+ for (j = 0; j < numextensions; j++)
{
- int j;
- GLint numextensions = 0;
- qglGetIntegerv(GL_NUM_EXTENSIONS, &numextensions);
- Con_DPrint("GL_EXTENSIONS:");
- for (j = 0; j < numextensions; j++)
- {
- const char *ext = (const char *)qglGetStringi(GL_EXTENSIONS, j);
- Con_DPrintf(" %s", ext);
- }
- Con_DPrint("\n");
+ const char *ext = (const char *)qglGetStringi(GL_EXTENSIONS, j);
+ Con_DPrintf(" %s", ext);
+ if(j && !(j % 3))
+ Con_DPrintf("\n");
}
+ Con_DPrint("\n");
+#endif //USE_GLES2
#ifndef USE_GLES2
missingfuncs[0] = 0;
vid.support.glshaderversion = (int)(atof(s) * 100.0f + 0.5f);
if (vid.support.glshaderversion < 100)
vid.support.glshaderversion = 100;
- Con_DPrintf("Detected GLSL #version %i\n", vid.support.glshaderversion);
+ Con_Printf("Detected GLSL version %i\n", vid.support.glshaderversion);
#ifdef USE_GLES2
// GLES devices in general do not like GL_BGRA, so use GL_RGBA
CHECKGLERROR
#ifdef USE_GLES2
- Con_DPrint("Using GLES2 rendering path\n");
+ Con_Print("Using GLES2 rendering path\n");
vid.renderpath = RENDERPATH_GLES2;
vid.sRGBcapable2D = false;
vid.sRGBcapable3D = false;
#else
- Con_DPrint("Using GL32 rendering path\n");
+ Con_Print("Using GL32 rendering path\n");
vid.renderpath = RENDERPATH_GL32;
vid.sRGBcapable2D = false;
vid.sRGBcapable3D = true;
// interpret command-line parameters
vid_commandlinecheck = false;
// COMMANDLINEOPTION: Video: -window performs +vid_fullscreen 0
- if (COM_CheckParm("-window") || COM_CheckParm("-safe") || (i = COM_CheckParm("+vid_fullscreen") != 0 && atoi(sys.argv[i+1]) == 0))
+ if (COM_CheckParm("-window") || COM_CheckParm("-safe") || ((i = COM_CheckParm("+vid_fullscreen")) != 0 && atoi(sys.argv[i+1]) == 0))
Cvar_SetValueQuick(&vid_fullscreen, false);
// COMMANDLINEOPTION: Video: -borderless performs +vid_borderless 1
- if (COM_CheckParm("-borderless") || (i = COM_CheckParm("+vid_borderless") != 0 && atoi(sys.argv[i+1]) == 1))
+ if (COM_CheckParm("-borderless") || ((i = COM_CheckParm("+vid_borderless")) != 0 && atoi(sys.argv[i+1]) == 1))
{
Cvar_SetValueQuick(&vid_borderless, true);
Cvar_SetValueQuick(&vid_fullscreen, false);
}
// COMMANDLINEOPTION: Video: -fullscreen performs +vid_fullscreen 1
- if (COM_CheckParm("-fullscreen") || (i = COM_CheckParm("+vid_fullscreen") != 0 && atoi(sys.argv[i+1]) == 1))
+ if (COM_CheckParm("-fullscreen") || ((i = COM_CheckParm("+vid_fullscreen")) != 0 && atoi(sys.argv[i+1]) == 1))
Cvar_SetValueQuick(&vid_fullscreen, true);
width = 0;
height = 0;
// 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)
- if ((i = COM_CheckParm("-width")) != 0 || (i = COM_CheckParm("+vid_width") != 0))
+ if ((i = COM_CheckParm("-width")) != 0 || ((i = COM_CheckParm("+vid_width")) != 0))
width = atoi(sys.argv[i+1]);
// 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)
- if ((i = COM_CheckParm("-height")) != 0 || (i = COM_CheckParm("+vid_height") != 0))
+ if ((i = COM_CheckParm("-height")) != 0 || ((i = COM_CheckParm("+vid_height")) != 0))
height = atoi(sys.argv[i+1]);
if (width == 0)
width = height * 4 / 3;