make startup and shutdown a little quieter
This commit is contained in:
parent
d66934942d
commit
6d6dc27592
|
@ -135,7 +135,7 @@ Draw_InitText (void)
|
||||||
tVAsize = 0;
|
tVAsize = 0;
|
||||||
|
|
||||||
if (tVAsize) {
|
if (tVAsize) {
|
||||||
Sys_Printf ("Text: %i maximum vertex elements.\n", tVAsize);
|
Sys_DPrintf ("Text: %i maximum vertex elements.\n", tVAsize);
|
||||||
|
|
||||||
if (textVertices)
|
if (textVertices)
|
||||||
free (textVertices);
|
free (textVertices);
|
||||||
|
@ -153,7 +153,7 @@ Draw_InitText (void)
|
||||||
for (i = 0; i < tVAsize; i++)
|
for (i = 0; i < tVAsize; i++)
|
||||||
tVAindices[i] = i;
|
tVAindices[i] = i;
|
||||||
} else {
|
} else {
|
||||||
Sys_Printf ("Text: Vertex Array use disabled.\n");
|
Sys_DPrintf ("Text: Vertex Array use disabled.\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -160,7 +160,7 @@ R_InitParticles (void)
|
||||||
else
|
else
|
||||||
pVAsize = 0;
|
pVAsize = 0;
|
||||||
if (pVAsize) {
|
if (pVAsize) {
|
||||||
Sys_Printf ("Particles: %i maximum vertex elements.\n", pVAsize);
|
Sys_DPrintf ("Particles: %i maximum vertex elements.\n", pVAsize);
|
||||||
|
|
||||||
if (particleVertexArray)
|
if (particleVertexArray)
|
||||||
free (particleVertexArray);
|
free (particleVertexArray);
|
||||||
|
@ -174,7 +174,7 @@ R_InitParticles (void)
|
||||||
for (i = 0; i < pVAsize; i++)
|
for (i = 0; i < pVAsize; i++)
|
||||||
pVAindices[i] = i;
|
pVAindices[i] = i;
|
||||||
} else {
|
} else {
|
||||||
Sys_Printf ("Particles: Vertex Array use disabled.\n");
|
Sys_DPrintf ("Particles: Vertex Array use disabled.\n");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (particleVertexArray) {
|
if (particleVertexArray) {
|
||||||
|
@ -213,7 +213,7 @@ R_ReadPointFile_f (void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Sys_Printf ("Reading %s...\n", name);
|
Sys_DPrintf ("Reading %s...\n", name);
|
||||||
c = 0;
|
c = 0;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
char buf[64];
|
char buf[64];
|
||||||
|
@ -225,7 +225,7 @@ R_ReadPointFile_f (void)
|
||||||
c++;
|
c++;
|
||||||
|
|
||||||
if (numparticles >= r_maxparticles) {
|
if (numparticles >= r_maxparticles) {
|
||||||
Sys_Printf ("Not enough free particles\n");
|
Sys_DPrintf ("Not enough free particles\n");
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
particle_new (pt_static, part_tex_dot, org, 1.5, vec3_origin,
|
particle_new (pt_static, part_tex_dot, org, 1.5, vec3_origin,
|
||||||
|
@ -233,7 +233,7 @@ R_ReadPointFile_f (void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Qclose (f);
|
Qclose (f);
|
||||||
Sys_Printf ("%i points read\n", c);
|
Sys_DPrintf ("%i points read\n", c);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
@ -258,7 +258,7 @@ GL_GetAliasFrameVerts16 (int frame, aliashdr_t *paliashdr, entity_t *e)
|
||||||
|
|
||||||
if ((frame >= paliashdr->mdl.numframes) || (frame < 0)) {
|
if ((frame >= paliashdr->mdl.numframes) || (frame < 0)) {
|
||||||
if (developer->int_val)
|
if (developer->int_val)
|
||||||
Sys_Printf ("R_AliasSetupFrame: no such frame %d %s\n", frame,
|
Sys_DPrintf ("R_AliasSetupFrame: no such frame %d %s\n", frame,
|
||||||
currententity->model->name);
|
currententity->model->name);
|
||||||
frame = 0;
|
frame = 0;
|
||||||
}
|
}
|
||||||
|
@ -364,7 +364,7 @@ GL_GetAliasFrameVerts (int frame, aliashdr_t *paliashdr, entity_t *e)
|
||||||
|
|
||||||
if ((frame >= paliashdr->mdl.numframes) || (frame < 0)) {
|
if ((frame >= paliashdr->mdl.numframes) || (frame < 0)) {
|
||||||
if (developer->int_val)
|
if (developer->int_val)
|
||||||
Sys_Printf ("R_AliasSetupFrame: no such frame %d %s\n", frame,
|
Sys_DPrintf ("R_AliasSetupFrame: no such frame %d %s\n", frame,
|
||||||
currententity->model->name);
|
currententity->model->name);
|
||||||
frame = 0;
|
frame = 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,7 +74,7 @@ R_GetSpriteFrame (entity_t *currententity)
|
||||||
frame = currententity->frame;
|
frame = currententity->frame;
|
||||||
|
|
||||||
if ((frame >= psprite->numframes) || (frame < 0)) {
|
if ((frame >= psprite->numframes) || (frame < 0)) {
|
||||||
Sys_Printf ("R_DrawSprite: no such frame %d\n", frame);
|
Sys_DPrintf ("R_DrawSprite: no such frame %d\n", frame);
|
||||||
frame = 0;
|
frame = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -260,7 +260,7 @@ R_InitSprites (void)
|
||||||
#else
|
#else
|
||||||
sVAsize = 4;
|
sVAsize = 4;
|
||||||
#endif
|
#endif
|
||||||
Sys_Printf ("Sprites: %i maximum vertex elements.\n", sVAsize);
|
Sys_DPrintf ("Sprites: %i maximum vertex elements.\n", sVAsize);
|
||||||
|
|
||||||
if (spriteVertexArray)
|
if (spriteVertexArray)
|
||||||
free (spriteVertexArray);
|
free (spriteVertexArray);
|
||||||
|
|
|
@ -821,15 +821,15 @@ R_InitFishEyeOnce (void)
|
||||||
|
|
||||||
if (fisheye_init_once_completed)
|
if (fisheye_init_once_completed)
|
||||||
return 1;
|
return 1;
|
||||||
Sys_Printf ("GL_ARB_texture_cube_map ");
|
Sys_DPrintf ("GL_ARB_texture_cube_map ");
|
||||||
if (QFGL_ExtensionPresent ("GL_ARB_texture_cube_map")) {
|
if (QFGL_ExtensionPresent ("GL_ARB_texture_cube_map")) {
|
||||||
qfglGetIntegerv (GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB,
|
qfglGetIntegerv (GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB,
|
||||||
&gl_cube_map_maxtex);
|
&gl_cube_map_maxtex);
|
||||||
Sys_Printf ("present, max texture size %d.\n",
|
Sys_DPrintf ("present, max texture size %d.\n",
|
||||||
(int) gl_cube_map_maxtex);
|
(int) gl_cube_map_maxtex);
|
||||||
gl_cube_map_capable = true;
|
gl_cube_map_capable = true;
|
||||||
} else {
|
} else {
|
||||||
Sys_Printf ("not found.\n");
|
Sys_DPrintf ("not found.\n");
|
||||||
gl_cube_map_capable = false;
|
gl_cube_map_capable = false;
|
||||||
}
|
}
|
||||||
fisheye_init_once_completed = true;
|
fisheye_init_once_completed = true;
|
||||||
|
|
|
@ -240,7 +240,7 @@ R_TimeRefresh_f (void)
|
||||||
|
|
||||||
stop = Sys_DoubleTime ();
|
stop = Sys_DoubleTime ();
|
||||||
time = stop - start;
|
time = stop - start;
|
||||||
Sys_Printf ("%f seconds (%f fps)\n", time, 128 / time);
|
Sys_DPrintf ("%f seconds (%f fps)\n", time, 128 / time);
|
||||||
|
|
||||||
GL_BeginRendering (&glx, &gly, &glwidth, &glheight);
|
GL_BeginRendering (&glx, &gly, &glwidth, &glheight);
|
||||||
}
|
}
|
||||||
|
|
|
@ -264,7 +264,7 @@ SCR_UpdateScreen (double realtime, SCR_Func *scr_funcs)
|
||||||
if (r_speeds->int_val) {
|
if (r_speeds->int_val) {
|
||||||
// qfglFinish ();
|
// qfglFinish ();
|
||||||
time2 = Sys_DoubleTime ();
|
time2 = Sys_DoubleTime ();
|
||||||
Sys_Printf ("%3i ms %4i wpoly %4i epoly %4i parts\n",
|
Sys_DPrintf ("%3i ms %4i wpoly %4i epoly %4i parts\n",
|
||||||
(int) ((time2 - time1) * 1000), c_brush_polys,
|
(int) ((time2 - time1) * 1000), c_brush_polys,
|
||||||
c_alias_polys, numparticles);
|
c_alias_polys, numparticles);
|
||||||
}
|
}
|
||||||
|
|
|
@ -221,7 +221,7 @@ Skin_Do_Translation_Model (model_t *model, int skinnum, int slot, skin_t *skin)
|
||||||
paliashdr = Cache_Get (&model->cache);
|
paliashdr = Cache_Get (&model->cache);
|
||||||
if (skinnum < 0
|
if (skinnum < 0
|
||||||
|| skinnum >= paliashdr->mdl.numskins) {
|
|| skinnum >= paliashdr->mdl.numskins) {
|
||||||
Sys_Printf ("(%d): Invalid player skin #%d\n", slot,
|
Sys_DPrintf ("(%d): Invalid player skin #%d\n", slot,
|
||||||
skinnum);
|
skinnum);
|
||||||
skinnum = 0;
|
skinnum = 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,11 +88,11 @@ VID_CheckDGA (Display * dpy, int *maj_ver, int *min_ver, int *hasvideo)
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((!maj_ver) || (*maj_ver != XDGA_MAJOR_VERSION)) {
|
if ((!maj_ver) || (*maj_ver != XDGA_MAJOR_VERSION)) {
|
||||||
Sys_Printf ("VID: Incorrect DGA version: %d.%d, \n", *maj_ver,
|
Sys_DPrintf ("VID: Incorrect DGA version: %d.%d, \n", *maj_ver,
|
||||||
*min_ver);
|
*min_ver);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Sys_Printf ("VID: DGA version: %d.%d\n", *maj_ver, *min_ver);
|
Sys_DPrintf ("VID: DGA version: %d.%d\n", *maj_ver, *min_ver);
|
||||||
|
|
||||||
if (!hasvideo)
|
if (!hasvideo)
|
||||||
hasvideo = &dummy_video;
|
hasvideo = &dummy_video;
|
||||||
|
@ -142,12 +142,12 @@ VID_CheckVMode (Display * dpy, int *maj_ver, int *min_ver)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if ((!maj_ver) || (*maj_ver != XF86VIDMODE_MAJOR_VERSION)) {
|
if ((!maj_ver) || (*maj_ver != XF86VIDMODE_MAJOR_VERSION)) {
|
||||||
Sys_Printf ("VID: Incorrect VidMode version: %d.%d\n", *maj_ver,
|
Sys_DPrintf ("VID: Incorrect VidMode version: %d.%d\n", *maj_ver,
|
||||||
*min_ver);
|
*min_ver);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Sys_Printf ("VID: VidMode version: %d.%d\n", *maj_ver, *min_ver);
|
Sys_DPrintf ("VID: VidMode version: %d.%d\n", *maj_ver, *min_ver);
|
||||||
return true;
|
return true;
|
||||||
#else
|
#else
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -135,7 +135,7 @@ IN_Shutdown (void)
|
||||||
{
|
{
|
||||||
JOY_Shutdown ();
|
JOY_Shutdown ();
|
||||||
|
|
||||||
Sys_Printf ("IN_Shutdown\n");
|
Sys_DPrintf ("IN_Shutdown\n");
|
||||||
IN_LL_Shutdown ();
|
IN_LL_Shutdown ();
|
||||||
|
|
||||||
IE_Shutdown ();
|
IE_Shutdown ();
|
||||||
|
|
|
@ -386,14 +386,14 @@ IN_InitMouse (void)
|
||||||
mouserate = atoi (com_argv[COM_CheckParm ("-mrate") + 1]);
|
mouserate = atoi (com_argv[COM_CheckParm ("-mrate") + 1]);
|
||||||
}
|
}
|
||||||
#if 0
|
#if 0
|
||||||
Sys_Printf ("Mouse: dev=%s,type=%s,speed=%d\n",
|
Sys_DPrintf ("Mouse: dev=%s,type=%s,speed=%d\n",
|
||||||
mousedev, mice[mtype].name, mouserate);
|
mousedev, mice[mtype].name, mouserate);
|
||||||
#endif
|
#endif
|
||||||
//FIXME: vga_init() opens the mouse automoatically
|
//FIXME: vga_init() opens the mouse automoatically
|
||||||
// closing it to ensure its opened how we want it
|
// closing it to ensure its opened how we want it
|
||||||
mouse_close();
|
mouse_close();
|
||||||
if (mouse_init ((char *)mousedev, mtype, mouserate)) {
|
if (mouse_init ((char *)mousedev, mtype, mouserate)) {
|
||||||
Sys_Printf ("No mouse found. Check your libvga.conf mouse settings"
|
Sys_DPrintf ("No mouse found. Check your libvga.conf mouse settings"
|
||||||
" and that the mouse\n"
|
" and that the mouse\n"
|
||||||
"device has appropriate permission settings.\n");
|
"device has appropriate permission settings.\n");
|
||||||
UseMouse = 0;
|
UseMouse = 0;
|
||||||
|
@ -406,7 +406,7 @@ IN_InitMouse (void)
|
||||||
void
|
void
|
||||||
IN_LL_Shutdown (void)
|
IN_LL_Shutdown (void)
|
||||||
{
|
{
|
||||||
Sys_Printf ("IN_LL_Shutdown\n");
|
Sys_DPrintf ("IN_LL_Shutdown\n");
|
||||||
|
|
||||||
if (UseMouse)
|
if (UseMouse)
|
||||||
mouse_close ();
|
mouse_close ();
|
||||||
|
|
|
@ -644,7 +644,7 @@ IN_LL_ProcessEvents (void)
|
||||||
void
|
void
|
||||||
IN_LL_Shutdown (void)
|
IN_LL_Shutdown (void)
|
||||||
{
|
{
|
||||||
Sys_Printf ("IN_LL_Shutdown\n");
|
Sys_DPrintf ("IN_LL_Shutdown\n");
|
||||||
in_mouse_avail = 0;
|
in_mouse_avail = 0;
|
||||||
if (x_disp) {
|
if (x_disp) {
|
||||||
XAutoRepeatOn (x_disp);
|
XAutoRepeatOn (x_disp);
|
||||||
|
|
|
@ -155,7 +155,7 @@ JOY_Init (void)
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (JOY_Open () == -1) {
|
if (JOY_Open () == -1) {
|
||||||
Sys_Printf ("JOY: Joystick not found.\n");
|
Sys_DPrintf ("JOY: Joystick not found.\n");
|
||||||
joy_found = false;
|
joy_found = false;
|
||||||
joy_active = false;
|
joy_active = false;
|
||||||
return;
|
return;
|
||||||
|
@ -164,12 +164,12 @@ JOY_Init (void)
|
||||||
joy_found = true;
|
joy_found = true;
|
||||||
|
|
||||||
if (!joy_enable->int_val) {
|
if (!joy_enable->int_val) {
|
||||||
Sys_Printf ("JOY: Joystick found, but not enabled.\n");
|
Sys_DPrintf ("JOY: Joystick found, but not enabled.\n");
|
||||||
joy_active = false;
|
joy_active = false;
|
||||||
JOY_Close ();
|
JOY_Close ();
|
||||||
}
|
}
|
||||||
|
|
||||||
Sys_Printf ("JOY: Joystick found and activated.\n");
|
Sys_DPrintf ("JOY: Joystick found and activated.\n");
|
||||||
|
|
||||||
// Initialize joystick if found and enabled
|
// Initialize joystick if found and enabled
|
||||||
for (i = 0; i < JOY_MAX_BUTTONS; i++) {
|
for (i = 0; i < JOY_MAX_BUTTONS; i++) {
|
||||||
|
|
|
@ -99,8 +99,8 @@ JOY_Close (void)
|
||||||
|
|
||||||
i = close (joy_handle);
|
i = close (joy_handle);
|
||||||
if (i) {
|
if (i) {
|
||||||
Sys_Printf ("JOY: Failed to close joystick device!\n");
|
Sys_DPrintf ("JOY: Failed to close joystick device!\n");
|
||||||
} else {
|
} else {
|
||||||
Sys_Printf ("JOY_Shutdown\n");
|
Sys_DPrintf ("JOY_Shutdown\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -403,7 +403,7 @@ Key_Game (knum_t key, short unicode)
|
||||||
kb = Key_GetBinding (IMT_0, key);
|
kb = Key_GetBinding (IMT_0, key);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Sys_Printf("kb %p, game_target %d, key_dest %d, key %d\n", kb,
|
Sys_DPrintf("kb %p, game_target %d, key_dest %d, key %d\n", kb,
|
||||||
game_target, key_dest, key);
|
game_target, key_dest, key);
|
||||||
*/
|
*/
|
||||||
if (!kb)
|
if (!kb)
|
||||||
|
|
|
@ -175,20 +175,20 @@ GL_Init (void)
|
||||||
if (!(dither_select = QFGL_ExtensionAddress ("gl3DfxSetDitherModeEXT")))
|
if (!(dither_select = QFGL_ExtensionAddress ("gl3DfxSetDitherModeEXT")))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Sys_Printf ("Dithering: ");
|
Sys_DPrintf ("Dithering: ");
|
||||||
|
|
||||||
if ((p = COM_CheckParm ("-dither")) && p < com_argc) {
|
if ((p = COM_CheckParm ("-dither")) && p < com_argc) {
|
||||||
if (strequal (com_argv[p+1], "2x2")) {
|
if (strequal (com_argv[p+1], "2x2")) {
|
||||||
dither_select (GR_DITHER_2x2);
|
dither_select (GR_DITHER_2x2);
|
||||||
Sys_Printf ("2x2.\n");
|
Sys_DPrintf ("2x2.\n");
|
||||||
}
|
}
|
||||||
if (strequal (com_argv[p+1], "4x4")) {
|
if (strequal (com_argv[p+1], "4x4")) {
|
||||||
dither_select (GR_DITHER_4x4);
|
dither_select (GR_DITHER_4x4);
|
||||||
Sys_Printf ("4x4.\n");
|
Sys_DPrintf ("4x4.\n");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
qfglDisable (GL_DITHER);
|
qfglDisable (GL_DITHER);
|
||||||
Sys_Printf ("disabled.\n");
|
Sys_DPrintf ("disabled.\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -343,7 +343,7 @@ VID_Init (unsigned char *palette)
|
||||||
|
|
||||||
vid.initialized = true;
|
vid.initialized = true;
|
||||||
|
|
||||||
Sys_Printf ("Video mode %dx%d initialized.\n", scr_width, scr_height);
|
Sys_DPrintf ("Video mode %dx%d initialized.\n", scr_width, scr_height);
|
||||||
|
|
||||||
vid.recalc_refdef = 1; // force a surface cache flush
|
vid.recalc_refdef = 1; // force a surface cache flush
|
||||||
}
|
}
|
||||||
|
|
|
@ -197,7 +197,7 @@ gl_multitexture_f (cvar_t *var)
|
||||||
qfglDisable (GL_TEXTURE_2D);
|
qfglDisable (GL_TEXTURE_2D);
|
||||||
} else {
|
} else {
|
||||||
gl_mtex_fullbright = false;
|
gl_mtex_fullbright = false;
|
||||||
Sys_Printf ("Not enough TMUs for BSP fullbrights.\n");
|
Sys_DPrintf ("Not enough TMUs for BSP fullbrights.\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -247,7 +247,7 @@ gl_anisotropy_f (cvar_t * var)
|
||||||
} else {
|
} else {
|
||||||
aniso = 1.0;
|
aniso = 1.0;
|
||||||
if (var)
|
if (var)
|
||||||
Sys_Printf ("Anisotropy (GL_EXT_texture_filter_anisotropic) is "
|
Sys_DPrintf ("Anisotropy (GL_EXT_texture_filter_anisotropic) is "
|
||||||
"not supported by your hardware and/or drivers.\n");
|
"not supported by your hardware and/or drivers.\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -264,7 +264,7 @@ gl_tessellate_f (cvar_t * var)
|
||||||
} else {
|
} else {
|
||||||
tess = 0;
|
tess = 0;
|
||||||
if (var)
|
if (var)
|
||||||
Sys_Printf ("TruForm (GL_ATI_pn_triangles) is not supported by "
|
Sys_DPrintf ("TruForm (GL_ATI_pn_triangles) is not supported by "
|
||||||
"your hardware and/or drivers.\n");
|
"your hardware and/or drivers.\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -334,14 +334,14 @@ CheckGLVersionString (void)
|
||||||
} else {
|
} else {
|
||||||
Sys_Error ("Malformed OpenGL version string!");
|
Sys_Error ("Malformed OpenGL version string!");
|
||||||
}
|
}
|
||||||
Sys_Printf ("GL_VERSION: %s\n", gl_version);
|
Sys_DPrintf ("GL_VERSION: %s\n", gl_version);
|
||||||
|
|
||||||
gl_vendor = (char *) qfglGetString (GL_VENDOR);
|
gl_vendor = (char *) qfglGetString (GL_VENDOR);
|
||||||
Sys_Printf ("GL_VENDOR: %s\n", gl_vendor);
|
Sys_DPrintf ("GL_VENDOR: %s\n", gl_vendor);
|
||||||
gl_renderer = (char *) qfglGetString (GL_RENDERER);
|
gl_renderer = (char *) qfglGetString (GL_RENDERER);
|
||||||
Sys_Printf ("GL_RENDERER: %s\n", gl_renderer);
|
Sys_DPrintf ("GL_RENDERER: %s\n", gl_renderer);
|
||||||
gl_extensions = (char *) qfglGetString (GL_EXTENSIONS);
|
gl_extensions = (char *) qfglGetString (GL_EXTENSIONS);
|
||||||
Sys_Printf ("GL_EXTENSIONS: %s\n", gl_extensions);
|
Sys_DPrintf ("GL_EXTENSIONS: %s\n", gl_extensions);
|
||||||
|
|
||||||
if (strstr (gl_renderer, "Mesa DRI Mach64"))
|
if (strstr (gl_renderer, "Mesa DRI Mach64"))
|
||||||
gl_feature_mach64 = true;
|
gl_feature_mach64 = true;
|
||||||
|
@ -376,14 +376,14 @@ CheckCombineExtensions (void)
|
||||||
{
|
{
|
||||||
if (gl_major >= 1 && gl_minor >= 3) {
|
if (gl_major >= 1 && gl_minor >= 3) {
|
||||||
gl_combine_capable = true;
|
gl_combine_capable = true;
|
||||||
Sys_Printf ("COMBINE active, multitextured doublebright enabled.\n");
|
Sys_DPrintf ("COMBINE active, multitextured doublebright enabled.\n");
|
||||||
} else if (QFGL_ExtensionPresent ("GL_ARB_texture_env_combine")) {
|
} else if (QFGL_ExtensionPresent ("GL_ARB_texture_env_combine")) {
|
||||||
gl_combine_capable = true;
|
gl_combine_capable = true;
|
||||||
Sys_Printf ("COMBINE_ARB active, multitextured doublebright "
|
Sys_DPrintf ("COMBINE_ARB active, multitextured doublebright "
|
||||||
"enabled.\n");
|
"enabled.\n");
|
||||||
} else {
|
} else {
|
||||||
gl_combine_capable = false;
|
gl_combine_capable = false;
|
||||||
Sys_Printf ("GL_ARB_texture_env_combine not found. gl_doublebright "
|
Sys_DPrintf ("GL_ARB_texture_env_combine not found. gl_doublebright "
|
||||||
"will have no effect with gl_multitexture on.\n");
|
"will have no effect with gl_multitexture on.\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -396,15 +396,15 @@ CheckCombineExtensions (void)
|
||||||
static void
|
static void
|
||||||
CheckMultiTextureExtensions (void)
|
CheckMultiTextureExtensions (void)
|
||||||
{
|
{
|
||||||
Sys_Printf ("Checking for multitexture: ");
|
Sys_DPrintf ("Checking for multitexture: ");
|
||||||
if (COM_CheckParm ("-nomtex")) {
|
if (COM_CheckParm ("-nomtex")) {
|
||||||
Sys_Printf ("disabled.\n");
|
Sys_DPrintf ("disabled.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (gl_major >= 1 && gl_minor >= 3) {
|
if (gl_major >= 1 && gl_minor >= 3) {
|
||||||
qfglGetIntegerv (GL_MAX_TEXTURE_UNITS, &gl_mtex_tmus);
|
qfglGetIntegerv (GL_MAX_TEXTURE_UNITS, &gl_mtex_tmus);
|
||||||
if (gl_mtex_tmus >= 2) {
|
if (gl_mtex_tmus >= 2) {
|
||||||
Sys_Printf ("enabled, %d TMUs.\n", gl_mtex_tmus);
|
Sys_DPrintf ("enabled, %d TMUs.\n", gl_mtex_tmus);
|
||||||
qglMultiTexCoord2f =
|
qglMultiTexCoord2f =
|
||||||
QFGL_ExtensionAddress ("glMultiTexCoord2f");
|
QFGL_ExtensionAddress ("glMultiTexCoord2f");
|
||||||
qglMultiTexCoord2fv =
|
qglMultiTexCoord2fv =
|
||||||
|
@ -414,15 +414,15 @@ CheckMultiTextureExtensions (void)
|
||||||
if (qglMultiTexCoord2f && gl_mtex_enum)
|
if (qglMultiTexCoord2f && gl_mtex_enum)
|
||||||
gl_mtex_capable = true;
|
gl_mtex_capable = true;
|
||||||
else
|
else
|
||||||
Sys_Printf ("Multitexture disabled, could not find required "
|
Sys_DPrintf ("Multitexture disabled, could not find required "
|
||||||
"functions\n");
|
"functions\n");
|
||||||
} else {
|
} else {
|
||||||
Sys_Printf ("Multitexture disabled, not enough TMUs.\n");
|
Sys_DPrintf ("Multitexture disabled, not enough TMUs.\n");
|
||||||
}
|
}
|
||||||
} else if (QFGL_ExtensionPresent ("GL_ARB_multitexture")) {
|
} else if (QFGL_ExtensionPresent ("GL_ARB_multitexture")) {
|
||||||
qfglGetIntegerv (GL_MAX_TEXTURE_UNITS_ARB, &gl_mtex_tmus);
|
qfglGetIntegerv (GL_MAX_TEXTURE_UNITS_ARB, &gl_mtex_tmus);
|
||||||
if (gl_mtex_tmus >= 2) {
|
if (gl_mtex_tmus >= 2) {
|
||||||
Sys_Printf ("enabled, %d TMUs.\n", gl_mtex_tmus);
|
Sys_DPrintf ("enabled, %d TMUs.\n", gl_mtex_tmus);
|
||||||
qglMultiTexCoord2f =
|
qglMultiTexCoord2f =
|
||||||
QFGL_ExtensionAddress ("glMultiTexCoord2fARB");
|
QFGL_ExtensionAddress ("glMultiTexCoord2fARB");
|
||||||
qglMultiTexCoord2fv =
|
qglMultiTexCoord2fv =
|
||||||
|
@ -432,13 +432,13 @@ CheckMultiTextureExtensions (void)
|
||||||
if (qglMultiTexCoord2f && gl_mtex_enum)
|
if (qglMultiTexCoord2f && gl_mtex_enum)
|
||||||
gl_mtex_capable = true;
|
gl_mtex_capable = true;
|
||||||
else
|
else
|
||||||
Sys_Printf ("Multitexture disabled, could not find required "
|
Sys_DPrintf ("Multitexture disabled, could not find required "
|
||||||
"functions\n");
|
"functions\n");
|
||||||
} else {
|
} else {
|
||||||
Sys_Printf ("Multitexture disabled, not enough TMUs.\n");
|
Sys_DPrintf ("Multitexture disabled, not enough TMUs.\n");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Sys_Printf ("not found.\n");
|
Sys_DPrintf ("not found.\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -481,7 +481,7 @@ CheckLights (void)
|
||||||
specular[4] = {0.1, 0.1, 0.1, 1.0};
|
specular[4] = {0.1, 0.1, 0.1, 1.0};
|
||||||
|
|
||||||
qfglGetIntegerv (GL_MAX_LIGHTS, &gl_max_lights);
|
qfglGetIntegerv (GL_MAX_LIGHTS, &gl_max_lights);
|
||||||
Sys_Printf ("Max GL Lights %d.\n", gl_max_lights);
|
Sys_DPrintf ("Max GL Lights %d.\n", gl_max_lights);
|
||||||
|
|
||||||
qfglEnable (GL_LIGHTING);
|
qfglEnable (GL_LIGHTING);
|
||||||
qfglLightModelfv (GL_LIGHT_MODEL_AMBIENT, dark);
|
qfglLightModelfv (GL_LIGHT_MODEL_AMBIENT, dark);
|
||||||
|
@ -516,7 +516,7 @@ VID_SetPalette (unsigned char *palette)
|
||||||
QFile *f;
|
QFile *f;
|
||||||
|
|
||||||
// 8 8 8 encoding
|
// 8 8 8 encoding
|
||||||
// Sys_Printf ("Converting 8to24\n");
|
Sys_DPrintf ("Converting 8to24\n");
|
||||||
|
|
||||||
pal = palette;
|
pal = palette;
|
||||||
table = d_8to24table;
|
table = d_8to24table;
|
||||||
|
@ -643,11 +643,11 @@ Tdfx_Init8bitPalette (void)
|
||||||
|
|
||||||
if (!(qgl3DfxSetPaletteEXT =
|
if (!(qgl3DfxSetPaletteEXT =
|
||||||
QFGL_ExtensionAddress ("gl3DfxSetPaletteEXT"))) {
|
QFGL_ExtensionAddress ("gl3DfxSetPaletteEXT"))) {
|
||||||
Sys_Printf ("3DFX_set_global_palette not found.\n");
|
Sys_DPrintf ("3DFX_set_global_palette not found.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Sys_Printf ("3DFX_set_global_palette.\n");
|
Sys_DPrintf ("3DFX_set_global_palette.\n");
|
||||||
|
|
||||||
oldpal = (char *) d_8to24table; // d_8to24table3dfx;
|
oldpal = (char *) d_8to24table; // d_8to24table3dfx;
|
||||||
for (i = 0; i < 256; i++) {
|
for (i = 0; i < 256; i++) {
|
||||||
|
@ -661,7 +661,7 @@ Tdfx_Init8bitPalette (void)
|
||||||
qgl3DfxSetPaletteEXT ((GLuint *) table);
|
qgl3DfxSetPaletteEXT ((GLuint *) table);
|
||||||
is8bit = true;
|
is8bit = true;
|
||||||
} else {
|
} else {
|
||||||
Sys_Printf ("\n 3DFX_set_global_palette not found.");
|
Sys_DPrintf ("\n 3DFX_set_global_palette not found.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -686,11 +686,11 @@ Shared_Init8bitPalette (void)
|
||||||
|
|
||||||
if (QFGL_ExtensionPresent ("GL_EXT_shared_texture_palette")) {
|
if (QFGL_ExtensionPresent ("GL_EXT_shared_texture_palette")) {
|
||||||
if (!(qglColorTableEXT = QFGL_ExtensionAddress ("glColorTableEXT"))) {
|
if (!(qglColorTableEXT = QFGL_ExtensionAddress ("glColorTableEXT"))) {
|
||||||
Sys_Printf ("glColorTableEXT not found.\n");
|
Sys_DPrintf ("glColorTableEXT not found.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Sys_Printf ("GL_EXT_shared_texture_palette\n");
|
Sys_DPrintf ("GL_EXT_shared_texture_palette\n");
|
||||||
|
|
||||||
qfglEnable (GL_SHARED_TEXTURE_PALETTE_EXT);
|
qfglEnable (GL_SHARED_TEXTURE_PALETTE_EXT);
|
||||||
oldPalette = (GLubyte *) d_8to24table; // d_8to24table3dfx;
|
oldPalette = (GLubyte *) d_8to24table; // d_8to24table3dfx;
|
||||||
|
@ -705,21 +705,21 @@ Shared_Init8bitPalette (void)
|
||||||
GL_UNSIGNED_BYTE, (GLvoid *) thePalette);
|
GL_UNSIGNED_BYTE, (GLvoid *) thePalette);
|
||||||
is8bit = true;
|
is8bit = true;
|
||||||
} else {
|
} else {
|
||||||
Sys_Printf ("\n GL_EXT_shared_texture_palette not found.");
|
Sys_DPrintf ("\n GL_EXT_shared_texture_palette not found.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
VID_Init8bitPalette (void)
|
VID_Init8bitPalette (void)
|
||||||
{
|
{
|
||||||
Sys_Printf ("Checking for 8-bit extension: ");
|
Sys_DPrintf ("Checking for 8-bit extension: ");
|
||||||
if (vid_use8bit->int_val) {
|
if (vid_use8bit->int_val) {
|
||||||
Tdfx_Init8bitPalette ();
|
Tdfx_Init8bitPalette ();
|
||||||
Shared_Init8bitPalette ();
|
Shared_Init8bitPalette ();
|
||||||
if (!is8bit)
|
if (!is8bit)
|
||||||
Sys_Printf ("\n 8-bit extension not found.\n");
|
Sys_DPrintf ("\n 8-bit extension not found.\n");
|
||||||
} else {
|
} else {
|
||||||
Sys_Printf ("disabled.\n");
|
Sys_DPrintf ("disabled.\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -211,7 +211,7 @@ static struct fb_var_screeninfo orig_var;
|
||||||
void
|
void
|
||||||
VID_Shutdown (void)
|
VID_Shutdown (void)
|
||||||
{
|
{
|
||||||
Sys_Printf ("VID_Shutdown\n");
|
Sys_DPrintf ("VID_Shutdown\n");
|
||||||
|
|
||||||
if (!fbdev_inited)
|
if (!fbdev_inited)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -150,7 +150,7 @@ QFGL_LoadLibrary (void)
|
||||||
void
|
void
|
||||||
VID_Shutdown (void)
|
VID_Shutdown (void)
|
||||||
{
|
{
|
||||||
Sys_Printf ("VID_Shutdown\n");
|
Sys_DPrintf ("VID_Shutdown\n");
|
||||||
X11_CloseDisplay ();
|
X11_CloseDisplay ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -254,7 +254,7 @@ VID_Init (unsigned char *palette)
|
||||||
VID_Init8bitPalette ();
|
VID_Init8bitPalette ();
|
||||||
VID_SetPalette (vid.palette);
|
VID_SetPalette (vid.palette);
|
||||||
|
|
||||||
Sys_Printf ("Video mode %dx%d initialized.\n", scr_width, scr_height);
|
Sys_DPrintf ("Video mode %dx%d initialized.\n", scr_width, scr_height);
|
||||||
|
|
||||||
vid.initialized = true;
|
vid.initialized = true;
|
||||||
|
|
||||||
|
|
|
@ -191,7 +191,7 @@ success:
|
||||||
VID_SetPalette (vid.palette);
|
VID_SetPalette (vid.palette);
|
||||||
VID_Init8bitPalette (); // Check for 3DFX Extensions and initialize them.
|
VID_Init8bitPalette (); // Check for 3DFX Extensions and initialize them.
|
||||||
|
|
||||||
Sys_Printf ("Video mode %dx%d initialized.\n", scr_width, scr_height);
|
Sys_DPrintf ("Video mode %dx%d initialized.\n", scr_width, scr_height);
|
||||||
|
|
||||||
vid.initialized = true;
|
vid.initialized = true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue