예제 #1
0
/*
==============
CG_TileClear

Clear around a sized down screen
==============
*/
void CG_TileClear( void ) {
	int		top, bottom, left, right;
	int		w, h;
	refdef_t *refdef = CG_GetRefdef();

	w = cgs.glconfig.vidWidth;
	h = cgs.glconfig.vidHeight;

	if ( refdef->x == 0 && refdef->y == 0 &&
		refdef->width == w && refdef->height == h ) {
		return;		// full screen rendering
	}

	top = refdef->y;
	bottom = top + refdef->height - 1;
	left = refdef->x;
	right = left + refdef->width - 1;

	// clear above view screen
	CG_TileClearBox( 0, 0, w, top, media.gfx.interface.backTile );

	// clear below view screen
	CG_TileClearBox( 0, bottom, w, h - bottom, media.gfx.interface.backTile );

	// clear left of view screen
	CG_TileClearBox( 0, top, left, bottom - top + 1, media.gfx.interface.backTile );

	// clear right of view screen
	CG_TileClearBox( right, top, w - right, bottom - top + 1, media.gfx.interface.backTile );
}
예제 #2
0
/*
==============
CG_TileClear

Clear around a sized down screen
==============
*/
void CG_TileClear( void ) {
	int top, bottom, left, right;
	int w, h;

	w = cgs.glconfig.vidWidth;
	h = cgs.glconfig.vidHeight;

	if ( cg.refdef.x == 0 && cg.refdef.y == 0 &&
		 cg.refdef.width == w && cg.refdef.height == h ) {
		return;     // full screen rendering
	}

	top = cg.refdef.y;
	bottom = top + cg.refdef.height - 1;
	left = cg.refdef.x;
	right = left + cg.refdef.width - 1;

	// clear above view screen
	CG_TileClearBox( 0, 0, w, top, cgs.media.backTileShader );

	// clear below view screen
	CG_TileClearBox( 0, bottom, w, h - bottom, cgs.media.backTileShader );

	// clear left of view screen
	CG_TileClearBox( 0, top, left, bottom - top + 1, cgs.media.backTileShader );

	// clear right of view screen
	CG_TileClearBox( right, top, w - right, bottom - top + 1, cgs.media.backTileShader );
}
예제 #3
0
/*
==============
CG_TileClear

Clear around a sized down screen
==============
*/
void CG_TileClear( void ) {
	int		top, bottom, left, right;
	float		x, y, w, h;

	if (cg.cur_ps->pm_type == PM_INTERMISSION || cg_viewsize.integer >= 100) {
		return;		// full screen rendering
	}

	// viewport coords
	x = cg.viewportX;
	y = cg.viewportY;
	w = cg.viewportWidth;
	h = cg.viewportHeight;

	// view screen coords
	top = cg.refdef.y;
	bottom = top + cg.refdef.height-1;
	left = cg.refdef.x;
	right = left + cg.refdef.width-1;

	// clear above view screen
	CG_TileClearBox( x, y, w, top, cgs.media.backTileShader );

	// clear below view screen
	CG_TileClearBox( x, bottom, w, h - bottom, cgs.media.backTileShader );

	// clear left of view screen
	CG_TileClearBox( x, top, left, bottom - top + 1, cgs.media.backTileShader );

	// clear right of view screen
	CG_TileClearBox( right, top, w - right, bottom - top + 1, cgs.media.backTileShader );
}