Skip to content

Commit

Permalink
Vulkan: Replace PATCH_STITCHING preprocessor define with r_patchStitc…
Browse files Browse the repository at this point in the history
…hing cvar

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

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

(cherry picked from commit 7aca568)
  • Loading branch information
JKSunny authored and taysta committed Apr 24, 2024
1 parent 401a278 commit 9006f1b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions codemp/rd-vulkan/tr_bsp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1634,13 +1634,13 @@ static void R_LoadSurfaces( const lump_t *surfs, const lump_t *verts, const lump
}

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

R_FixSharedVertexLodError(worldData);

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

vk_debug("...loaded %d faces, %i meshes, %i trisurfs, %i flares\n", numFaces, numMeshes, numTriSurfs, numFlares );
Expand Down
1 change: 1 addition & 0 deletions codemp/rd-vulkan/tr_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -900,6 +900,7 @@ void R_Register( void )
r_marksOnTriangleMeshes = ri.Cvar_Get( "r_marksOnTriangleMeshes", "0", CVAR_ARCHIVE_ND, "" );
r_aspectCorrectFonts = ri.Cvar_Get( "r_aspectCorrectFonts", "0", CVAR_ARCHIVE, "" );
cl_ratioFix = ri.Cvar_Get( "cl_ratioFix", "1", CVAR_ARCHIVE, "" );
r_patchStitching = ri.Cvar_Get( "r_patchStitching", "1", CVAR_ARCHIVE, "Enable stitching of neighbouring patch surfaces" );
r_maxpolys = ri.Cvar_Get( "r_maxpolys", XSTRING( DEFAULT_MAX_POLYS ), CVAR_NONE, "" );
r_maxpolyverts = ri.Cvar_Get( "r_maxpolyverts", XSTRING( DEFAULT_MAX_POLYVERTS ), CVAR_NONE, "" );

Expand Down
1 change: 1 addition & 0 deletions codemp/rd-vulkan/tr_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -1606,6 +1606,7 @@ extern cvar_t *r_marksOnTriangleMeshes;

extern cvar_t *r_aspectCorrectFonts;
extern cvar_t *cl_ratioFix;
extern cvar_t *r_patchStitching;

// Vulkan
extern cvar_t *r_defaultImage;
Expand Down

0 comments on commit 9006f1b

Please sign in to comment.