From 64ab392fc5e1565713340f8ae5bae4b5f2fdff64 Mon Sep 17 00:00:00 2001 From: Simon Date: Sun, 2 Apr 2023 19:42:39 +0100 Subject: [PATCH] JKA: Some CVAR change to increase performance --- Projects/Android/jni/OpenJK/code/cgame/cg_main.cpp | 2 +- .../Android/jni/OpenJK/code/rd-gles/tr_init.cpp | 13 +++++++++++-- Projects/Android/jni/OpenJK/code/ui/ui_atoms.cpp | 2 +- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Projects/Android/jni/OpenJK/code/cgame/cg_main.cpp b/Projects/Android/jni/OpenJK/code/cgame/cg_main.cpp index 203d8da..423a75d 100644 --- a/Projects/Android/jni/OpenJK/code/cgame/cg_main.cpp +++ b/Projects/Android/jni/OpenJK/code/cgame/cg_main.cpp @@ -398,7 +398,7 @@ static cvarTable_t cvarTable[] = { { &cg_stereoSeparation, "cg_stereoSeparation", "0.065", CVAR_ARCHIVE }, { &cg_worldScale, "cg_worldScale", "33.5", CVAR_ARCHIVE }, { &cg_heightAdjust, "cg_heightAdjust", "0.0", CVAR_ARCHIVE }, - { &cg_shadows, "cg_shadows", "3", CVAR_ARCHIVE }, + { &cg_shadows, "cg_shadows", "1", CVAR_ARCHIVE }, { &cg_renderToTextureFX, "cg_renderToTextureFX", "1", CVAR_ARCHIVE }, { &cg_shadowCullDistance, "r_shadowRange", "1000", CVAR_ARCHIVE }, { &cg_footsteps, "cg_footsteps", "3", CVAR_ARCHIVE },//1 = sounds, 2 = sounds & effects, 3 = sounds, effects & marks, 4 = always diff --git a/Projects/Android/jni/OpenJK/code/rd-gles/tr_init.cpp b/Projects/Android/jni/OpenJK/code/rd-gles/tr_init.cpp index 2c00c15..2b8aea3 100644 --- a/Projects/Android/jni/OpenJK/code/rd-gles/tr_init.cpp +++ b/Projects/Android/jni/OpenJK/code/rd-gles/tr_init.cpp @@ -1585,10 +1585,15 @@ void R_Register( void ) r_DynamicGlowWidth = ri.Cvar_Get( "r_DynamicGlowWidth", "320", CVAR_ARCHIVE_ND | CVAR_LATCH ); r_DynamicGlowHeight = ri.Cvar_Get( "r_DynamicGlowHeight", "240", CVAR_ARCHIVE_ND | CVAR_LATCH ); +#ifndef JK2_MODE + r_picmip = ri.Cvar_Get ("r_picmip", "1", CVAR_ARCHIVE | CVAR_LATCH ); + r_detailTextures = ri.Cvar_Get( "r_detailtextures", "0", CVAR_ARCHIVE_ND | CVAR_LATCH ); +#else r_picmip = ri.Cvar_Get ("r_picmip", "0", CVAR_ARCHIVE | CVAR_LATCH ); + r_detailTextures = ri.Cvar_Get( "r_detailtextures", "1", CVAR_ARCHIVE_ND | CVAR_LATCH ); +#endif ri.Cvar_CheckRange( r_picmip, 0, 16, qtrue ); r_colorMipLevels = ri.Cvar_Get ("r_colorMipLevels", "0", CVAR_LATCH ); - r_detailTextures = ri.Cvar_Get( "r_detailtextures", "1", CVAR_ARCHIVE_ND | CVAR_LATCH ); r_texturebits = ri.Cvar_Get( "r_texturebits", "0", CVAR_ARCHIVE_ND | CVAR_LATCH ); r_texturebitslm = ri.Cvar_Get( "r_texturebitslm", "0", CVAR_ARCHIVE_ND | CVAR_LATCH ); r_overBrightBits = ri.Cvar_Get ("r_overBrightBits", "1", CVAR_ARCHIVE_ND | CVAR_LATCH ); @@ -1610,7 +1615,11 @@ void R_Register( void ) // r_lodCurveError = ri.Cvar_Get( "r_lodCurveError", "1000", CVAR_ARCHIVE_ND ); r_lodbias = ri.Cvar_Get( "r_lodbias", "0", CVAR_ARCHIVE_ND ); +#ifndef JK2_MODE + r_flares = ri.Cvar_Get ("r_flares", "0", CVAR_ARCHIVE_ND ); +#else r_flares = ri.Cvar_Get ("r_flares", "1", CVAR_ARCHIVE_ND ); +#endif r_lodscale = ri.Cvar_Get( "r_lodscale", "10", CVAR_ARCHIVE_ND ); r_znear = ri.Cvar_Get( "r_znear", "4", CVAR_ARCHIVE_ND ); //if set any lower, you lose a lot of precision in the distance @@ -1686,7 +1695,7 @@ void R_Register( void ) r_offsetUnits = ri.Cvar_Get( "r_offsetunits", "-2", CVAR_CHEAT ); r_lockpvs = ri.Cvar_Get ("r_lockpvs", "0", CVAR_CHEAT); r_noportals = ri.Cvar_Get ("r_noportals", "0", CVAR_CHEAT); - r_shadows = ri.Cvar_Get( "cg_shadows", "3", 0 ); + r_shadows = ri.Cvar_Get( "cg_shadows", "1", 0 ); r_shadowRange = ri.Cvar_Get( "r_shadowRange", "1000", CVAR_ARCHIVE_ND ); /* diff --git a/Projects/Android/jni/OpenJK/code/ui/ui_atoms.cpp b/Projects/Android/jni/OpenJK/code/ui/ui_atoms.cpp index a91fbda..46ecdb6 100644 --- a/Projects/Android/jni/OpenJK/code/ui/ui_atoms.cpp +++ b/Projects/Android/jni/OpenJK/code/ui/ui_atoms.cpp @@ -300,7 +300,7 @@ void UI_Init( int apiVersion, uiimport_t *uiimport, qboolean inGameLoad ) ui.Cvar_Create( "g_subtitles", "0", CVAR_ARCHIVE ); ui.Cvar_Create( "cg_marks", "1", CVAR_ARCHIVE ); ui.Cvar_Create( "d_slowmodeath", "3", CVAR_ARCHIVE ); - ui.Cvar_Create( "cg_shadows", "3", CVAR_ARCHIVE ); + ui.Cvar_Create( "cg_shadows", "1", CVAR_ARCHIVE ); ui.Cvar_Create( "cg_runpitch", "0.0", CVAR_ARCHIVE ); ui.Cvar_Create( "cg_runroll", "0.0", CVAR_ARCHIVE );