Skip to content

Commit

Permalink
Renderers: Replace PATCH_STITCHING preprocessor define with r_patchSt…
Browse files Browse the repository at this point in the history
…itching cvar

Cherrypicked: (JACoders@540edeb)
Pull request: (JACoders#1199)

Co-Authored-By: razor <844370+razish@users.noreply.github.com>

(cherry picked from commit 3ae2bbd)
  • Loading branch information
JKSunny authored and taysta committed Apr 24, 2024
1 parent 9006f1b commit 117c484
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
5 changes: 1 addition & 4 deletions codemp/rd-dedicated/tr_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,7 @@ Ghoul2 Insert End

cvar_t *r_aviMotionJpegQuality;
cvar_t *r_screenshotJpegQuality;

cvar_t *r_patchStitching;
cvar_t *r_patchStitching;

/*
** R_GetModeInfo
Expand Down Expand Up @@ -455,9 +454,7 @@ Ghoul2 Insert Start
/*
Ghoul2 Insert End
*/

r_patchStitching = ri.Cvar_Get("r_patchStitching", "1", CVAR_ARCHIVE, "Enable stitching of neighbouring patch surfaces" );

r_modelpoolmegs = ri.Cvar_Get("r_modelpoolmegs", "20", CVAR_ARCHIVE, "" );
if (ri.Sys_LowPhysicalMemory() )
ri.Cvar_Set("r_modelpoolmegs", "0");
Expand Down
4 changes: 2 additions & 2 deletions codemp/rd-vanilla/tr_bsp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1393,13 +1393,13 @@ static void R_LoadSurfaces( lump_t *surfs, lump_t *verts, lump_t *indexLump, wor
}

if ( r_patchStitching->integer ) {
R_StitchAllPatches(worldData);
R_StitchAllPatches( worldData );
}

R_FixSharedVertexLodError(worldData);

if ( r_patchStitching->integer ) {
R_MovePatchSurfacesToHunk(worldData);
R_MovePatchSurfacesToHunk( worldData );
}

ri.Printf( PRINT_ALL, "...loaded %d faces, %i meshes, %i trisurfs, %i flares\n", numFaces, numMeshes, numTriSurfs, numFlares );
Expand Down
2 changes: 1 addition & 1 deletion codemp/rd-vanilla/tr_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ cvar_t *se_language;
cvar_t *r_aviMotionJpegQuality;
cvar_t *r_screenshotJpegQuality;

cvar_t *r_patchStitching;
cvar_t *r_patchStitching;

#if !defined(__APPLE__)
PFNGLSTENCILOPSEPARATEPROC qglStencilOpSeparate;
Expand Down
2 changes: 1 addition & 1 deletion codemp/rd-vanilla/tr_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -1292,7 +1292,7 @@ extern cvar_t *r_noServerGhoul2;
Ghoul2 Insert End
*/

extern cvar_t *r_patchStitching;
extern cvar_t *r_patchStitching;

//====================================================================

Expand Down

0 comments on commit 117c484

Please sign in to comment.