C3DScreen::RenderText

Top  Previous  Next

Syntax:

 

RenderText(int  x, int  y, string  text, UINT  col)

 

Purpose:
Draws text on the 3D surface.

 

Parameters:

x, y - 2D coordinate to position text.

text - The text to draw.
col - The color of the text in RGBA format.

 

Returned value(s):

None.

 

Application:

s.Clear(RGBA(0,0,0,255))
s.BeginScene(c)
scene.Draw()
s.RenderText(0,10,"FPS:"+STR$(fps),RGBA(255,255,0,255))
s.RenderText(0,30,"Use arrow keys to move around",RGBA(255,255,0,255))
fps = s.RenderScene()

 

Class Hierarchy

C3DScreen

 

Additional Info:

Text is drawn with the font specified with the SetFont method.  Alpha blending is enabled for text and can be controlled using the RGBA function.