diff options
Diffstat (limited to 'src/cgame/cg_drawtools.c')
-rw-r--r-- | src/cgame/cg_drawtools.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/cgame/cg_drawtools.c b/src/cgame/cg_drawtools.c index b7b980f9..7d32fa1d 100644 --- a/src/cgame/cg_drawtools.c +++ b/src/cgame/cg_drawtools.c @@ -172,7 +172,34 @@ void CG_DrawPic( float x, float y, float width, float height, qhandle_t hShader trap_R_DrawStretchPic( x, y, width, height, 0, 0, 1, 1, hShader ); } +/* +================ +CG_SetClipRegion +================= +*/ +void CG_SetClipRegion( float x, float y, float w, float h ) +{ + vec4_t clip; + + CG_AdjustFrom640( &x, &y, &w, &h ); + + clip[ 0 ] = x; + clip[ 1 ] = y; + clip[ 2 ] = x + w; + clip[ 3 ] = y + h; + trap_R_SetClipRegion( clip ); +} + +/* +================ +CG_ClearClipRegion +================= +*/ +void CG_ClearClipRegion( void ) +{ + trap_R_SetClipRegion( NULL ); +} /* ================ |