graphics.FPS

( Brutus2D 1.4.x, 1.5.x, 1.6, 1.7 )

graphics.FPS - return how many frames per second are drawn

Description

fps = graphics.FPS

  • fps - the actual number of frames drawn per second

graphics.FPS returns how many frames per second are drawn.

Examples

graphics.Initialize
key.Initialize

graphics.SetTitle "zapp!"

font = graphics.CreateFont("arial",10)

Do While Not key.Pressed( vk_escape ) And Not key.Pressed( vk_windowx)
    graphics.Clear
    graphics.SetText graphics.FPS,100,100,font
    graphics.Display
Loop

graphics.Terminate
key.Terminate

In this example, the value returned by graphics.FPS is displayed using graphics.SetText.

Useful Info

  • graphics.FPS is updated once per second.

Related Pages

page tags: fps graphics
page_revision: 2, last_edited: 1214231697|%e %b %Y, %H:%M %Z (%O ago)