Exemplo n.º 1
0
void CG_DrawTopBottom(float x, float y, float w, float h, float size)
{
    CG_AdjustFrom640( &x, &y, &w, &h );
    size *= cgs.screenYScale;
    RE_StretchPic( x, y, w, size, 0, 0, 0, 0, cgs.media.whiteShader );
    RE_StretchPic( x, y + h - size, w, size, 0, 0, 0, 0, cgs.media.whiteShader );
}
Exemplo n.º 2
0
/*
================
CG_DrawSides
 
Coords are virtual 640x480
================
*/
void CG_DrawSides(float x, float y, float w, float h, float size)
{
    CG_AdjustFrom640( &x, &y, &w, &h );
    size *= cgs.screenXScale;
    RE_StretchPic( x, y, size, h, 0, 0, 0, 0, cgs.media.whiteShader );
    RE_StretchPic( x + w - size, y, size, h, 0, 0, 0, 0, cgs.media.whiteShader );
}
Exemplo n.º 3
0
/*
===============
CG_DrawChar
 
Coordinates and size in 640*480 virtual screen size
===============
*/
void CG_DrawChar( int x, int y, int width, int height, int ch )
{
    int row, col;
    float frow, fcol;
    float size;
    float	ax, ay, aw, ah;

    ch &= 255;

    if ( ch == ' ' )
    {
        return;
    }

    ax = x;
    ay = y;
    aw = width;
    ah = height;
    CG_AdjustFrom640( &ax, &ay, &aw, &ah );

    row = ch>>4;
    col = ch&15;

    frow = row*0.0625;
    fcol = col*0.0625;
    size = 0.0625;

    RE_StretchPic( ax, ay, aw, ah,
                           fcol, frow,
                           fcol + size, frow + size,
                           cgs.media.charsetShader );
}
Exemplo n.º 4
0
/*
** RE_BeginRegistration
*/
void RE_BeginRegistration(glconfig_t *glconfigOut)
{
	R_Init();

	*glconfigOut = glConfig;

	R_SyncRenderThread();

	tr.visIndex = 0;
	memset(tr.visClusters, -2, sizeof(tr.visClusters)); // force markleafs to regenerate

	R_ClearFlares();

	RE_ClearScene();

	// HACK: give world entity white color for "colored" shader keyword
	tr.worldEntity.e.shaderRGBA[0] = 255;
	tr.worldEntity.e.shaderRGBA[1] = 255;
	tr.worldEntity.e.shaderRGBA[2] = 255;
	tr.worldEntity.e.shaderRGBA[3] = 255;

	tr.worldEntity.e.nonNormalizedAxes = qfalse;

	// RB: world will be never ignored by occusion query test
	tr.worldEntity.occlusionQuerySamples = 1;

	tr.registered = qtrue;

	// NOTE: this sucks, for some reason the first stretch pic is never drawn
	// without this we'd see a white flash on a level load because the very
	// first time the level shot would not be drawn
	RE_StretchPic(0, 0, 0, 0, 0, 0, 1, 1, 0);
}
Exemplo n.º 5
0
/*
================
CG_FillRect
 
Coordinates are 640*480 virtual values
=================
*/
void CG_FillRect( float x, float y, float width, float height, const float *color )
{
    RE_SetColor( color );

    CG_AdjustFrom640( &x, &y, &width, &height );
    RE_StretchPic( x, y, width, height, 0, 0, 0, 0, cgs.media.whiteShader );

    RE_SetColor( NULL );
}
Exemplo n.º 6
0
/*
=============
CG_TileClearBox
 
This repeats a 64*64 tile graphic to fill the screen around a sized down
refresh window.
=============
*/
static void CG_TileClearBox( int x, int y, int w, int h, qhandle_t hShader )
{
    float	s1, t1, s2, t2;

    s1 = x/64.0;
    t1 = y/64.0;
    s2 = (x+w)/64.0;
    t2 = (y+h)/64.0;
    RE_StretchPic( x, y, w, h, s1, t1, s2, t2, hShader );
}
Exemplo n.º 7
0
void Q_EXTERNAL_CALL RE_StretchPicMulti( const stretchRect_t *rects, unsigned int numRects, qhandle_t hShader )
{
	uint i;	
	for( i = 0; i < numRects; i++ )
	{
		const stretchRect_t *r = rects + i;
		RE_StretchPic( r->pos[0], r->pos[1], r->size[0], r->size[1],
			NULL, r->tc0[0], r->tc0[1], r->tc1[0], r->tc1[1], hShader );
	}
}
Exemplo n.º 8
0
Arquivo: tr_model.c Projeto: luaman/zq
/*
** RE_BeginRegistration
*/
void RE_BeginRegistration( glconfig_t *glconfigOut ) {

	R_Init();

	*glconfigOut = glConfig;

	R_SyncRenderThread();

	tr.viewCluster = -1;		// force markleafs to regenerate
	R_ClearFlares();
	RE_ClearScene();

	tr.registered = qtrue;

	// NOTE: this sucks, for some reason the first stretch pic is never drawn
	// without this we'd see a white flash on a level load because the very
	// first time the level shot would not be drawn
	RE_StretchPic(0, 0, 0, 0, 0, 0, 1, 1, 0);
}
Exemplo n.º 9
0
/*
================
CG_DrawPic
 
Coordinates are 640*480 virtual values
=================
*/
void CG_DrawPic( float x, float y, float width, float height, qhandle_t hShader )
{
    CG_AdjustFrom640( &x, &y, &width, &height );
    RE_StretchPic( x, y, width, height, 0, 0, 1, 1, hShader );
}