engine/EngineVideoFont.c
/*	Basic routine for drawing fonts onto the screen.
*/
Basic routine for drawing fonts onto the screen.
Basic routine for drawing fonts onto the screen .
void Font_Draw(Font_t *fFont,const char *ccMessage,vec3_t vPos,vec3_t vColour)
{
	VideoObjectVertex_t voFont[4] = { { { 0 } } };
	Video_ObjectTexture(&voFont[0], VIDEO_TEXTURE_DIFFUSE, 0, 0);
	Video_ObjectTexture(&voFont[1], VIDEO_TEXTURE_DIFFUSE, 1.0f, 0);
	Video_ObjectTexture(&voFont[2], VIDEO_TEXTURE_DIFFUSE, 1.0f, 1.0f);
	Video_ObjectTexture(&voFont[3], VIDEO_TEXTURE_DIFFUSE, 0, 1.0f);
	Math_VectorCopy(vPos,voFont[0].mvPosition);
	Math_VectorCopy(vPos,voFont[1].mvPosition);
	Math_VectorCopy(vPos,voFont[2].mvPosition);
	Math_VectorCopy(vPos,voFont[3].mvPosition);
#if 0
	voFont[1].vVertex[0] += sFontSurface->w;
	voFont[2].vVertex[0] += sFontSurface->w;
	voFont[2].vVertex[1] += sFontSurface->h;
	voFont[3].vVertex[1] += sFontSurface->h;
#endif
	Video_DrawFill(voFont, NULL, 0);
}
void Font_Draw ( Font_t * fFont , const char * ccMessage , vec3_t vPos , vec3_t vColour ) { VideoObjectVertex_t voFont [ 4 ] = { { { 0 } } } ; Video_ObjectTexture ( & voFont [ 0 ] , VIDEO_TEXTURE_DIFFUSE , 0 , 0 ) ; Video_ObjectTexture ( & voFont [ 1 ] , VIDEO_TEXTURE_DIFFUSE , 1.0f , 0 ) ; Video_ObjectTexture ( & voFont [ 2 ] , VIDEO_TEXTURE_DIFFUSE , 1.0f , 1.0f ) ; Video_ObjectTexture ( & voFont [ 3 ] , VIDEO_TEXTURE_DIFFUSE , 0 , 1.0f ) ; Math_VectorCopy ( vPos , voFont [ 0 ] . mvPosition ) ; Math_VectorCopy ( vPos , voFont [ 1 ] . mvPosition ) ; Math_VectorCopy ( vPos , voFont [ 2 ] . mvPosition ) ; Math_VectorCopy ( vPos , voFont [ 3 ] . mvPosition ) ; #if 0 voFont [ 1 ] . vVertex [ 0 ] += sFontSurface -> w ; voFont [ 2 ] . vVertex [ 0 ] += sFontSurface -> w ; voFont [ 2 ] . vVertex [ 1 ] += sFontSurface -> h ; voFont [ 3 ] . vVertex [ 1 ] += sFontSurface -> h ; #endif Video_DrawFill ( voFont , NULL , 0 ) ; }
Basic routine for drawing fonts onto the screen.
Basic routine for drawing fonts onto the screen .
/*	todo:
			need to reserve bind slot.
			calc/save font size.
	*/