Repository navigation
Profiling
MilliSecs counts whole milliseconds, which is fine for a game that runs at 60 frames per second (one frame is 16.7 ms) and not good enough for anything faster. This page shows what to use instead, how to time the parts of a program, and how to read what the runtime reports.
MilliSecs() returns an Int that goes up by one every millisecond, and every call returns the whole number, rounded down. A frame that takes 2 ms (500 frames per second) is therefore measured as 1, 2 or 3 ms depending on where in the millisecond the frame started, and one that takes 0.5 ms is measured as 0 or 1. Two things follow:
- A single frame time taken from two
MilliSecs()calls is off by up to 1 ms. At 500 frames per second that is up to 50% of the frame. Adding up many of these frame times (for a score, an average or a maximum) keeps the rounding noise instead of cancelling it, and the number changes from run to run even when the program did exactly the same. - A frame time of 0 makes a division by it useless, and a program that computes
1000 / (now - last)for its frames per second shows jumps between 333, 500 and 1000 instead of a steady value.
Measuring a long stretch with two calls (the start and the end of a run of 3000 frames) is still accurate to 1 ms in total. What breaks is everything that looks at one frame at a time.
On top of that, MilliSecs() wraps around after about 24.8 days, so only the difference between two calls means something. It counts on the same clock as Microseconds() (not following the system time), only in whole milliseconds and from the start of the system.
| Need | Use |
|---|---|
| Time of one frame, time of a loaded file, any duration in a program that has to run the same everywhere | Microseconds |
| How long the parts of a frame take, with a report | ProfileBegin and ProfileEnd with ProfileValue |
How long the runtime spends in UpdateWorld, RenderWorld, Flip, waiting for the GPU, ... |
--profile, ProfileFPS and ProfileValue
|
| Which frames stutter | ProfileSlow |
| Which functions of the program take the time (Windows) | ProfileSample |
Microseconds() works in every program, needs no option, and returns a UInt64. Keep the result in a variable declared with :UInt64 and subtract before converting, so that nothing is lost:
start:UInt64 = Microseconds()
Delay 20
elapsed:UInt64 = Microseconds() - start
Print "took " + (Float(elapsed) / 1000.0) + " ms"- A variable without a type is an
Intand keeps only 32 bits, and aFloatrounds.Float(Microseconds() - start)is fine, because the difference is small. -
Microseconds()counts from the start of the program and does not follow the system time, so setting the clock while the program runs does not disturb a measurement. - The value has microsecond digits, but how finely the clock of the system ticks depends on the system, so do not expect the last digits to mean anything. Time many frames, or many repeats of the work, instead of trusting one tiny difference.
ProfileBegin "name" and ProfileEnd "name" time a part of the program, and the runtime adds the result to its own list of timers. They only do something in a program that was compiled with --profile (or -d); in any other program they are empty calls, so they can stay in the source of a release.
Graphics 64, 64, 0, 2
For i = 1 To 10
ProfileBegin "ai"
Delay 2 ; the part that is measured
ProfileEnd "ai"
Cls
Flip
Print "ai took " + ProfileValue("ai") + " ms"
NextHow it behaves:
-
A key is a name of your own, in any case (
"AI"and"ai"are the same), up to 63 characters. There are at most 64 keys, and a key can not be the name of one of the runtime's items (see ProfileItemName). A key that does not fit is ignored. -
The numbers are per frame. A frame is the time from one
Flipto the next. Everything a key collects between two Flips is added up, so a part that runs 200 times in a frame (one call per entity, for example) gives the sum of all 200. At the Flip the sum is stored and starts again at 0. -
Read the numbers after the Flip. ProfileValue gives the frame that ended with the last Flip, in milliseconds as a
Float. Before the first full frame, and for a key that does not exist, it returns 0. ProfileFlipCount changes with every Flip, so a program can see that there are new numbers. -
Different keys can be nested. A key is its own timer, and keys do not know about each other, so an outer part includes the time of the parts inside it. The runtime does not subtract anything: if
"frame logic"contains"ai"and"physics", then"frame logic"is at least as large as the two together. -
The same key can not be nested in itself.
ProfileBegin "ai"while"ai"is already running starts the timer again and forgets the first start, and the firstProfileEndends it. A function that calls itself can not be timed with one key on every level; time the outermost call instead. -
ProfileEndwithoutProfileBegindoes nothing, and so does a secondProfileEndfor the same start. -
The time is wall time (a clock that does not depend on the system time, like
Microseconds), so a part that waits, for example inDelay, shows that waiting. - Cost. A pair of calls reads the clock twice and searches the list of keys. That is cheap next to a frame, but do not put them around a single addition in a loop that runs a million times; time the loop.
- The timers can be stopped with ProfileEnable
0, for example while the program loads, and started again with1.
Compile with --profile (or -d, which turns it on as well):
blitzcc --profile -o game.exe game.bb
With --profile the runtime times UpdateWorld, the animation, RenderWorld (and its parts), EntityInView, CopyRect, Flip, Delay, the time the program waits for the GPU, and the passes the GPU runs. The program is a little slower for it (one clock read per call of those commands), which is why it is not on by default. Turn the report on with the environment variable BLITZLLVM_PROFILE_FPS=1 (older name: BLITZ_FPS=1) or with ProfileFPS 1, and it prints once a second on the standard error output, or into the file of ProfileOutput:
cpu: x86_64 v3: sse3 ssse3 ...
fps: 497, submits: 497, waiting: 12.4 ms
gpu thread: vkQueueSubmit 20.1 ms, vkQueuePresentKHR 3.2 ms, frames that had to be waited for 0
gpu passes: scene 610.2 ms, 2d 32.5 ms, copy 10.1 ms, present 4.0 ms, frame 702.7 ms
UpdateWorld: 41.0 ms
animation: 6.2 ms
RenderWorld: 480.3 ms
...
Flip: 120.8 ms
ai: 83.4 ms
(The numbers are made up to show the layout.) How to read it:
-
fpsis the number of Flips in the last second. Every other number in a report is the total for that second in milliseconds, not per frame: divide byfpsfor an average per frame.RenderWorld: 480.3 msat 497 fps is about 0.97 ms per frame. - The lines that start with two spaces and belong to
RenderWorld(lights+cameras, collect, draws, sort+group, record commands) are parts of it.clusters for GPU cullingis part ofdraws. Do not add them toRenderWorld. -
waitingis the time the program waited for the GPU, andframes that had to be waited forcounts frames where the GPU was still working on a frame when the program needed its slot. A program with a largewaitingis limited by the GPU, not by its own code. - The GPU passes come back a frame or two late, and are the time the GPU spent, which runs next to the CPU. They do not add up with the CPU timers.
- Your own keys from
ProfileBeginare at the end of the list, with the total of the second like the others. - If the program is vsynced (
Flip 1),Flipwill contain the wait for the display, andfpswill be the refresh rate. UseFlip 2orFlip 0to measure how fast the program can go. See Presentation sync.
A frame that takes much longer than the others disappears in these totals. ProfileSlow milliseconds (or BLITZLLVM_PROFILE_SLOW) lists such frames one by one, with the frame number and where their time went:
slow frame 1432: 24.1 ms: UpdateWorld 0.8, RenderWorld 2.1, Flip 20.3, waiting for the GPU 19.7, ai 0.9
gpu finished since the Flip before: scene 0.4 ms, 2d 0.0 ms, copy 0.0 ms, present 0.0 ms, frame 0.5 ms, vkQueueSubmit 0.1 ms
Only timers of at least 0.5 ms are listed.
To use the numbers inside the program, and not read text, use ProfileValue with the names from ProfileItemName, for example ProfileValue("RenderWorld: draws") or ProfileValue("frame").
The timers measure where the time goes, not how fast the program is. For the speed use the frame rate or the time of a fixed amount of work, and take the number of frames into account (see below).
A frame counter with MilliSecs for the frame time and the score of a benchmark. At 500 frames per second each dt is 1, 2 or 3 (or 0):
Graphics 64, 64, 0, 2
last = MilliSecs()
total = 0
frames = 0
worst = 0
While frames < 3000
; ... the work of the frame ...
Cls
Flip 2
now = MilliSecs()
dt = now - last
last = now
total = total + dt ; adds up the rounding
If dt > worst Then worst = dt
frames = frames + 1
Wend
Print "average " + (Float(total) / frames) + " ms, worst " + worst + " ms"
Print "fps " + (1000.0 / (Float(total) / frames))The same, with Microseconds. The time is kept as a UInt64 and converted to milliseconds only when it is shown or compared:
Graphics 64, 64, 0, 2
last:UInt64 = Microseconds()
begin:UInt64 = last
frames = 0
worst# = 0.0
While frames < 3000
; ... the work of the frame ...
Cls
Flip 2
now:UInt64 = Microseconds()
dt# = Float(now - last) / 1000.0 ; milliseconds, with a fraction
last = now
If dt > worst Then worst = dt
frames = frames + 1
Wend
total# = Float(last - begin) / 1000.0
Print "average " + (total / frames) + " ms, worst " + worst + " ms"
Print "fps " + (1000.0 / (total / frames))Things to take from this:
- The total is taken from one start and one end (
last - begin). It is exact, and it does not depend on how many frames the loop has. Only the per-frame values (dt,worst) come from many small differences. - The score or the frame rate should come from the total divided by the number of frames, not from the average of the single
dt. - Keep
now,lastandbeginasUInt64. A variable that is not declared with:UInt64is anIntand loses the upper bits of the value. - Check that the program does not depend on
dtbeing a whole number. A game that moves byspeed * dtwithdtin milliseconds as anIntbecomes smoother with the fraction, which is usually what you want; if a value was a counter of whole milliseconds on purpose, keep it that way.
Add the parts of the frame as keys, compile with --profile, and read them after the Flip:
Graphics 64, 64, 0, 2
For frame = 1 To 600
ProfileBegin "ai"
; ... update all enemies ...
ProfileEnd "ai"
ProfileBegin "physics"
; ... collisions ...
ProfileEnd "physics"
ProfileBegin "render"
Cls
; ... RenderWorld ...
ProfileEnd "render"
Flip 2
If frame Mod 100 = 0
Print "frame " + ProfileFlipCount() + ": " + ProfileValue("frame") + " ms (ai " + ProfileValue("ai") + ", physics " + ProfileValue("physics") + ", render " + ProfileValue("render") + ", waiting for the GPU " + ProfileValue("waiting for the GPU") + ")"
EndIf
NextRun it with BLITZLLVM_PROFILE_FPS=1 to get the averages per second, and with BLITZLLVM_PROFILE_SLOW=5 (or ProfileSlow 5.0) to see the frames that took more than 5 ms. A single value of ProfileValue is one frame, so it has the usual spread; look at the totals of the report or average several frames before you compare two versions.
- Compile both the same way, run them on the same machine, and look at several runs. A real-world program shows a spread between two runs of the same build, and a difference smaller than that spread is noise, not a result.
- Use
Flip 2orFlip 0so the refresh rate does not cap the frame rate, and a window (not fullscreen) with a fixed size. - Pick the GPU explicitly on a machine that has more than one, and say which. The timers of a program that was compiled with
--profileare not the numbers of a release build; use them to find where the time goes, and a release build withMicroseconds()for the final comparison. - Turn the timers off with ProfileEnable
0for the part that must not be measured, such as the loading.
ProfileSample "file" (or BLITZLLVM_PROFILE_SAMPLE=file) samples the program every millisecond and writes where it was. It only works on Windows, in a program compiled with --profile; with -g as well the call stacks are recorded, see Environment variables for the files and their format.
| Command | What it does |
|---|---|
| Microseconds | Time in microseconds as a UInt64, in every program. |
| ProfileBegin, ProfileEnd | Time a part of the program, per frame. Needs --profile. |
| ProfileValue | The number of an item for the last frame, in milliseconds. |
| ProfileFlipCount | The number of the last measured frame. |
| ProfileItemCount, ProfileItemName | List the items that ProfileValue knows. |
| ProfileEnable | Turn the timers on or off at run time. |
| ProfileFPS | Print the report once a second. |
| ProfileSlow | List the frames that take longer than a number of milliseconds. |
| ProfileOutput | Send the text of the profiling to a file. |
| ProfileSample | Record where the program spends its time (Windows). |
Differences
- Overview
Features (43)
- 3D Studio models
- Asynchronous loading
- blitz-format
- Blitz-Tidy
- Color depth
- Colors
- Console window on Windows
- CPU features
- Culling
- Debug handle checks
- Depth buffer
- DirectX models
- Displays
- DPI scaling on Windows
- Fullscreen
- glTF models
- Image formats
- IPv6
- Language
- Large Meshes
- Lost graphics device
- Many lights
- Memory
- Mip maps
- Movie controls
- Multiplayer
- Number suffixes
- Numbers of other sizes
- Parameter modes (In, Out, InOut)
- Physics
- Presentation sync
- Profiling your own code
- Samplers
- Saving pictures
- Scan Codes
- Sound resampling
- Spherical fog
- Sprite depth fade (soft edges)
- Sprite shapes
- The windows of BlitzPlus
- Types everywhere
- Userlib declarations
- Warnings
Commands (415)
- ActivateWindow
- ActiveObjects
- ActiveWindow
- AddVertex
- AnimateMD2
- AntiAlias
- AppTitle
- AsyncLoading 〔BlitzLLVM〕
- AsyncSaving 〔BlitzLLVM〕
- AvailVidMem
- BrushTexture
- BSPAmbientLight
- BSPLighting
- BufferDirty
- Byte 〔BlitzLLVM〕
- ByteSwap 〔BlitzLLVM〕
- CameraFogMode
- CanvasBuffer
- ChannelPan
- ChannelPitch
- ChannelPlaying
- ChannelVolume
- ClientHeight
- ClientWidth
- CloseMovie
- Collisions
- CollisionTime
- Confirm
- CopyPixel
- CopyPixelFast
- CopyRect
- CountDisplayModes 〔BlitzLLVM〕
- CountDisplays 〔BlitzLLVM〕
- CountGfxDrivers
- CountGfxModes
- CountHostAddresses
- CountHostIPs
- CountRefreshRates 〔BlitzLLVM〕
- CreateButton
- CreateCanvas
- CreateComboBox
- CreateHtmlView 〔BlitzLLVM〕
- CreateImage
- CreateLabel
- CreateListBox
- CreateListener
- CreateMenu
- CreatePhysicsBody 〔BlitzLLVM〕
- CreatePhysicsBodyFromEntity 〔BlitzLLVM〕
- CreatePhysicsWorld 〔BlitzLLVM〕
- CreatePlane
- CreateTabber
- CreateTCPServer
- CreateTerrain
- CreateTextArea
- CreateTexture
- CreateToolBar
- CreateUDPStream
- CreateWindow
- DebugObjects
- Desktop
- DesktopBuffer
- DirectInputEnabled
- DisplayDepth 〔BlitzLLVM〕
- DisplayHeight 〔BlitzLLVM〕
- DisplayModeDepth 〔BlitzLLVM〕
- DisplayModeHeight 〔BlitzLLVM〕
- DisplayModeRefreshRate 〔BlitzLLVM〕
- DisplayModeWidth 〔BlitzLLVM〕
- DisplayName 〔BlitzLLVM〕
- DisplayRefreshRate 〔BlitzLLVM〕
- DisplayScale 〔BlitzLLVM〕
- DisplayWidth 〔BlitzLLVM〕
- DisplayX 〔BlitzLLVM〕
- DisplayY 〔BlitzLLVM〕
- Double 〔BlitzLLVM〕
- DrawBlockRect
- DrawImage
- DrawImageRect
- DrawMovie
- EmitSound
- EnableDirectInput
- EndGraphics
- EntityDepthFade 〔BlitzLLVM〕
- EntityLighting
- EntityStatic 〔BlitzLLVM〕
- EntityTexture
- Flip
- FlipCanvas
- FlushJoy
- FlushKeys
- FlushMouse
- FontHeight
- FontWidth
- FormatTextAreaText
- FreeFont
- FreeImage
- FreePhysicsWorld 〔BlitzLLVM〕
- FreeSound
- FreeTexture
- FrontBuffer
- GammaBlue
- GammaGreen
- GammaRed
- GetBrushTexture
- GetHostAddress
- GetJoy
- GetKey
- GetMouse
- GetMovieTexture 〔BlitzLLVM〕
- GetPhysicsAngularDamping 〔BlitzLLVM〕
- GetPhysicsAngularVelocityX 〔BlitzLLVM〕
- GetPhysicsAngularVelocityY 〔BlitzLLVM〕
- GetPhysicsAngularVelocityZ 〔BlitzLLVM〕
- GetPhysicsAwake 〔BlitzLLVM〕
- GetPhysicsBaumgarte 〔BlitzLLVM〕
- GetPhysicsBodyMotion 〔BlitzLLVM〕
- GetPhysicsBodyShape 〔BlitzLLVM〕
- GetPhysicsBodyWorld 〔BlitzLLVM〕
- GetPhysicsContactSlop 〔BlitzLLVM〕
- GetPhysicsContinuous 〔BlitzLLVM〕
- GetPhysicsContinuousDefault 〔BlitzLLVM〕
- GetPhysicsDeterministic 〔BlitzLLVM〕
- GetPhysicsFriction 〔BlitzLLVM〕
- GetPhysicsGravityScale 〔BlitzLLVM〕
- GetPhysicsGravityX 〔BlitzLLVM〕
- GetPhysicsGravityY 〔BlitzLLVM〕
- GetPhysicsGravityZ 〔BlitzLLVM〕
- GetPhysicsLayer 〔BlitzLLVM〕
- GetPhysicsLinearDamping 〔BlitzLLVM〕
- GetPhysicsLinearVelocityX 〔BlitzLLVM〕
- GetPhysicsLinearVelocityY 〔BlitzLLVM〕
- GetPhysicsLinearVelocityZ 〔BlitzLLVM〕
- GetPhysicsMaskHigh 〔BlitzLLVM〕
- GetPhysicsMaskLow 〔BlitzLLVM〕
- GetPhysicsMass 〔BlitzLLVM〕
- GetPhysicsMaxDelta 〔BlitzLLVM〕
- GetPhysicsMaxSteps 〔BlitzLLVM〕
- GetPhysicsMode 〔BlitzLLVM〕
- GetPhysicsPositionIterations 〔BlitzLLVM〕
- GetPhysicsRate 〔BlitzLLVM〕
- GetPhysicsRestitution 〔BlitzLLVM〕
- GetPhysicsSensor 〔BlitzLLVM〕
- GetPhysicsSleepThreshold 〔BlitzLLVM〕
- GetPhysicsSolver 〔BlitzLLVM〕
- GetPhysicsSpeculativeDistance 〔BlitzLLVM〕
- GetPhysicsSubsteps 〔BlitzLLVM〕
- GetPhysicsThreads 〔BlitzLLVM〕
- GetPhysicsVelocityIterations 〔BlitzLLVM〕
- GetPhysicsWorldSleeping 〔BlitzLLVM〕
- GetSurfaceBrush
- GetTCPStreamAddress
- GetUDPMsgAddress
- GetUDPStreamAddress
- GfxDriver3D
- GfxDriverCaps3D
- GfxDriverName
- GfxModeDepth
- GfxModeExists
- GfxModeFormat
- GfxModeHeight
- GfxModeWidth
- GrabImage
- Graphics
- Graphics3D
- GraphicsDepth
- GraphicsFormat
- Half 〔BlitzLLVM〕
- HidePointer
- HostIP
- HtmlViewEventURL 〔BlitzLLVM〕
- HtmlViewRun 〔BlitzLLVM〕
- HtmlViewStatus 〔BlitzLLVM〕
- HWMultiTex
- HWRawInput
- ImageBuffer
- ImagesCollide
- Include
- Input
- Int
- JoyChanged
- JoyDeviceConnected
- JoyDeviceCount
- JoyDeviceName
- JoyHat
- JoyType
- JoyWait
- KeyboardChanged
- KeyboardDeviceConnected
- KeyboardDeviceCount
- KeyboardDeviceName
- KeyDown
- KeyHit
- LastJoyDevice
- LastKeyboardDevice
- LastMouseDevice
- LeadingZeros 〔BlitzLLVM〕
- Load3DSound
- LoadAnimMesh
- LoadAnimTexture
- LoadBSP
- LoadBuffer
- LoaderMatrix
- LoadFont
- LoadImage
- LoadMesh
- LoadSound
- LoadTerrain
- LoadTexture
- Locate
- LockBuffer
- LockedFormat
- LockedPitch
- LockedPixels
- LockMouse
- LockTextArea
- Long 〔BlitzLLVM〕
- LoopMovie 〔BlitzLLVM〕
- LoopSound
- MaximizeWindow
- MeshCullBox
- Microseconds 〔BlitzLLVM〕
- MinimizeWindow
- ModifyTerrain
- MouseChanged
- MouseDeviceConnected
- MouseDeviceCount
- MouseDeviceName
- MouseDown
- MouseHit
- MouseX
- MouseXSpeed
- MouseY
- MouseYSpeed
- MouseZ
- MouseZSpeed
- MoveMouse
- MovieHeight
- MovieLength 〔BlitzLLVM〕
- MoviePlaying
- MoviePosition 〔BlitzLLVM〕
- MovieVolume 〔BlitzLLVM〕
- MovieWidth
- Notify
- OpenMovie
- OpenTCPStream
- PauseChannel
- PauseMovie 〔BlitzLLVM〕
- PhysicsAngularDamping 〔BlitzLLVM〕
- PhysicsAngularVelocity 〔BlitzLLVM〕
- PhysicsApplyAngularImpulse 〔BlitzLLVM〕
- PhysicsApplyForce 〔BlitzLLVM〕
- PhysicsApplyForceAt 〔BlitzLLVM〕
- PhysicsApplyImpulse 〔BlitzLLVM〕
- PhysicsApplyImpulseAt 〔BlitzLLVM〕
- PhysicsApplyTorque 〔BlitzLLVM〕
- PhysicsBaumgarte 〔BlitzLLVM〕
- PhysicsBodyMotion 〔BlitzLLVM〕
- PhysicsBodyWorld 〔BlitzLLVM〕
- PhysicsContactSlop 〔BlitzLLVM〕
- PhysicsContinuous 〔BlitzLLVM〕
- PhysicsContinuousDefault 〔BlitzLLVM〕
- PhysicsDeterministic 〔BlitzLLVM〕
- PhysicsFriction 〔BlitzLLVM〕
- PhysicsGravity 〔BlitzLLVM〕
- PhysicsGravityScale 〔BlitzLLVM〕
- PhysicsLayer 〔BlitzLLVM〕
- PhysicsLinearDamping 〔BlitzLLVM〕
- PhysicsLinearVelocity 〔BlitzLLVM〕
- PhysicsMass 〔BlitzLLVM〕
- PhysicsMaxDelta 〔BlitzLLVM〕
- PhysicsMaxSteps 〔BlitzLLVM〕
- PhysicsMode 〔BlitzLLVM〕
- PhysicsPositionIterations 〔BlitzLLVM〕
- PhysicsRate 〔BlitzLLVM〕
- PhysicsRestitution 〔BlitzLLVM〕
- PhysicsSensor 〔BlitzLLVM〕
- PhysicsSleeping 〔BlitzLLVM〕
- PhysicsSleepThreshold 〔BlitzLLVM〕
- PhysicsSolver 〔BlitzLLVM〕
- PhysicsSpeculativeDistance 〔BlitzLLVM〕
- PhysicsSubsteps 〔BlitzLLVM〕
- PhysicsThreads 〔BlitzLLVM〕
- PhysicsUpdate 〔BlitzLLVM〕
- PhysicsVelocityIterations 〔BlitzLLVM〕
- PhysicsWake 〔BlitzLLVM〕
- PhysicsWorldSleeping 〔BlitzLLVM〕
- PickedTime
- PlayCDTrack
- PlayMovie 〔BlitzLLVM〕
- PlayMusic
- PlaySound
- PopCount 〔BlitzLLVM〕
- Proceed
- ProfileBegin
- ProfileEnable
- ProfileEnd
- ProfileFlipCount
- ProfileFPS
- ProfileItemCount
- ProfileItemName
- ProfileOutput
- ProfileSample
- ProfileSlow
- ProfileValue
- ProjectedX
- ProjectedZ
- QueryObject
- RawInput
- RawInputEnabled
- ReadPixel
- ReadPixel64 〔BlitzLLVM〕
- ReadPixelFast
- ReadPixelFast64 〔BlitzLLVM〕
- RefreshRateAt 〔BlitzLLVM〕
- RenderWorld
- RequestColor
- RequestDir
- RequestFile
- RequestFont
- ResizeImage
- ResumeChannel
- RotL 〔BlitzLLVM〕
- RotR 〔BlitzLLVM〕
- RuntimeError
- SatByte 〔BlitzLLVM〕
- SatInt 〔BlitzLLVM〕
- SatLong 〔BlitzLLVM〕
- SatShort 〔BlitzLLVM〕
- SatUByte 〔BlitzLLVM〕
- SatUInt 〔BlitzLLVM〕
- SatULong 〔BlitzLLVM〕
- SatUShort 〔BlitzLLVM〕
- SaveBuffer
- SaveImage
- ScaleImage
- ScanLine
- SeekMovie 〔BlitzLLVM〕
- SendUDPMsg
- SendUDPMsgTo
- SetBuffer
- SetCubeFace
- SetCubeMode
- SetFont
- SetGadgetFont
- SetGamma
- SetGfxDriver
- SetMenuText
- SetMinWindowSize
- SetSamplerAddressModeU 〔BlitzLLVM〕
- SetSamplerAddressModeV 〔BlitzLLVM〕
- SetSamplerAddressModeW 〔BlitzLLVM〕
- SetSamplerAnisotropy 〔BlitzLLVM〕
- SetSamplerBorderColor 〔BlitzLLVM〕
- SetSamplerFilterMag 〔BlitzLLVM〕
- SetSamplerFilterMin 〔BlitzLLVM〕
- SetSamplerFilterMip 〔BlitzLLVM〕
- SetSamplerLodBias 〔BlitzLLVM〕
- SetTextAreaFont
- SetToolBarTips
- Short 〔BlitzLLVM〕
- ShowPointer
- Single 〔BlitzLLVM〕
- SoundPan
- SoundPitch
- SoundVolume
- SpriteDepthFade 〔BlitzLLVM〕
- SpriteViewMode
- StartNetGame
- Stats3D
- Step
- Stop
- StopChannel
- StopMovie 〔BlitzLLVM〕
- StringHeight
- StringWidth
- SystemProperty
- TCPStreamIP
- TerrainDetail
- TerrainShading
- Text
- TextureBlend
- TextureBuffer
- TextureCoords
- TextureHeight
- TextureName
- TextureWidth
- TFormImage
- TotalVidMem
- TrailingZeros 〔BlitzLLVM〕
- UByte 〔BlitzLLVM〕
- UDPMsgIP
- UDPStreamIP
- UInt 〔BlitzLLVM〕
- ULong 〔BlitzLLVM〕
- UnlockMouse
- UpdateGamma
- UpdateWindowMenu
- UShort 〔BlitzLLVM〕
- VertexTexCoords
- VertexW
- VKeyDown
- VKeyHit
- VWait
- WaitJoy
- WBuffer
- WindowScale 〔BlitzLLVM〕
- WindowScaling 〔BlitzLLVM〕
- WireFrame
- Write
- WritePixel
- WritePixel64 〔BlitzLLVM〕
- WritePixelFast
- WritePixelFast64 〔BlitzLLVM〕
Language Features
- Overview
Math (31)
- Overview
- Abs
- ACos
- ASin
- ATan
- ATan2
- ByteSwap 〔BlitzLLVM〕
- Ceil
- Cos
- Exp
- Floor
- LeadingZeros 〔BlitzLLVM〕
- Log
- Log10
- Mod
- Pi
- PopCount 〔BlitzLLVM〕
- RotL 〔BlitzLLVM〕
- RotR 〔BlitzLLVM〕
- SatByte 〔BlitzLLVM〕
- SatInt 〔BlitzLLVM〕
- SatLong 〔BlitzLLVM〕
- SatShort 〔BlitzLLVM〕
- SatUByte 〔BlitzLLVM〕
- SatUInt 〔BlitzLLVM〕
- SatULong 〔BlitzLLVM〕
- SatUShort 〔BlitzLLVM〕
- Sgn
- Sin
- Sqr
- Tan
- TrailingZeros 〔BlitzLLVM〕
Time & Date (8)
BlitzBasic
- Overview
Buffers and Pixels (20)
- Overview
- BackBuffer
- BufferDirty
- CopyPixel
- CopyPixelFast
- CopyRect
- FrontBuffer
- GraphicsBuffer
- LoadBuffer
- LockBuffer
- ReadPixel
- ReadPixel64 〔BlitzLLVM〕
- ReadPixelFast
- ReadPixelFast64 〔BlitzLLVM〕
- SaveBuffer
- SetBuffer
- UnlockBuffer
- WritePixel
- WritePixel64 〔BlitzLLVM〕
- WritePixelFast
- WritePixelFast64 〔BlitzLLVM〕
Display (46)
- Overview
- AvailVidMem
- CountDisplayModes 〔BlitzLLVM〕
- CountDisplays 〔BlitzLLVM〕
- CountGfxDrivers
- CountGfxModes
- CountRefreshRates 〔BlitzLLVM〕
- DisplayDepth 〔BlitzLLVM〕
- DisplayHeight 〔BlitzLLVM〕
- DisplayModeDepth 〔BlitzLLVM〕
- DisplayModeHeight 〔BlitzLLVM〕
- DisplayModeRefreshRate 〔BlitzLLVM〕
- DisplayModeWidth 〔BlitzLLVM〕
- DisplayName 〔BlitzLLVM〕
- DisplayRefreshRate 〔BlitzLLVM〕
- DisplayScale 〔BlitzLLVM〕
- DisplayWidth 〔BlitzLLVM〕
- DisplayX 〔BlitzLLVM〕
- DisplayY 〔BlitzLLVM〕
- EndGraphics
- Flip
- GammaBlue
- GammaGreen
- GammaRed
- GfxDriver 〔BlitzLLVM〕
- GfxDriverName
- GfxModeDepth
- GfxModeExists
- GfxModeFormat
- GfxModeHeight
- GfxModeWidth
- Graphics
- GraphicsDepth
- GraphicsFormat
- GraphicsHeight
- GraphicsLost
- GraphicsPalette
- GraphicsWidth
- HidePointer
- PrimaryDisplay 〔BlitzLLVM〕
- RefreshRateAt 〔BlitzLLVM〕
- SetGamma
- SetGfxDriver
- ShowPointer
- TotalVidMem
- UpdateGamma
- VWait
Fonts and Text (12)
Images (39)
- Overview
- AsyncLoading 〔BlitzLLVM〕
- AsyncSaving 〔BlitzLLVM〕
- AutoMidHandle
- CopyImage
- CreateImage
- DrawBlock
- DrawBlockRect
- DrawImage
- DrawImageRect
- FreeImage
- GrabImage
- HandleImage
- ImageBuffer
- ImageFrameDelay
- ImageFrames
- ImageHeight
- ImageReady 〔BlitzLLVM〕
- ImageRectCollide
- ImageRectOverlap
- ImagesCollide
- ImagesOverlap
- ImageWidth
- ImageXHandle
- ImageYHandle
- LoadAnimImage
- LoadImage
- MaskImage
- MidHandle
- RectsOverlap
- ResizeImage
- RotateImage
- SaveImage
- SavesFailed 〔BlitzLLVM〕
- SavesPending 〔BlitzLLVM〕
- ScaleImage
- TFormFilter
- TFormImage
- TileBlock
- TileImage
Mouse (25)
- Overview
- DirectInputEnabled
- EnableDirectInput
- FlushMouse
- GetMouse
- HWRawInput
- LastMouseDevice
- LockMouse
- MouseChanged
- MouseDeviceConnected
- MouseDeviceCount
- MouseDeviceName
- MouseDown
- MouseHit
- MouseWait
- MouseX
- MouseXSpeed
- MouseY
- MouseYSpeed
- MouseZ
- MouseZSpeed
- MoveMouse
- RawInput
- RawInputEnabled
- UnlockMouse
- WaitMouse
Movies (15)
- Overview
- CloseMovie
- DrawMovie
- GetMovieTexture 〔BlitzLLVM〕
- LoopMovie 〔BlitzLLVM〕
- MovieHeight
- MovieLength 〔BlitzLLVM〕
- MoviePlaying
- MoviePosition 〔BlitzLLVM〕
- MovieVolume 〔BlitzLLVM〕
- MovieWidth
- OpenMovie
- PauseMovie 〔BlitzLLVM〕
- PlayMovie 〔BlitzLLVM〕
- SeekMovie 〔BlitzLLVM〕
- StopMovie 〔BlitzLLVM〕
Network (26)
- Overview
- AcceptTCPStream
- CloseTCPServer
- CloseTCPStream
- CloseUDPStream
- CountHostAddresses
- CountHostIPs
- CreateTCPServer
- CreateUDPStream
- DottedIP
- GetHostAddress
- GetTCPStreamAddress
- GetUDPMsgAddress
- GetUDPStreamAddress
- HostIP
- OpenTCPStream
- RecvUDPMsg
- SendUDPMsg
- SendUDPMsgTo
- TCPStreamIP
- TCPStreamPort
- TCPTimeouts
- UDPMsgIP
- UDPMsgPort
- UDPStreamIP
- UDPStreamPort
- UDPTimeouts
Blitz3D
- Overview
3D Sound (2)
Animation (16)
BSP (4)
- Overview
- BSPAmbientLight
- BSPLighting
- BSPLightmapColor 〔BlitzLLVM〕
- LoadBSP
Display (9)
- Overview
- CountGfxModes3D
- GfxDriver3D
- GfxDriverCaps3D
- GfxMode3D
- GfxMode3DExists
- GfxMode3DHeight 〔BlitzLLVM〕
- GfxMode3DWidth 〔BlitzLLVM〕
- Graphics3D
- Windowed3D
Entities (44)
- Overview
- AlignToVector
- CopyEntity
- CountChildren
- CreatePivot
- EntityAlpha
- EntityAutoFade
- EntityBlend
- EntityClass
- EntityColor
- EntityDepthFade 〔BlitzLLVM〕
- EntityDistance
- EntityFX
- EntityInView
- EntityLightChannel 〔BlitzLLVM〕
- EntityLighting
- EntityName
- EntityOrder
- EntityParent
- EntityPitch
- EntityReady 〔BlitzLLVM〕
- EntityRoll
- EntityShininess
- EntityStatic 〔BlitzLLVM〕
- EntityTexture
- EntityX
- EntityY
- EntityYaw
- EntityZ
- FindChild
- FreeEntity
- GetChild
- GetMatElement
- GetParent
- HideEntity
- MoveEntity
- NameEntity
- PaintEntity
- PointEntity
- PositionEntity
- RotateEntity
- ScaleEntity
- ShowEntity
- TranslateEntity
- TurnEntity
Lights (5)
Physics (83)
- Overview
- CreatePhysicsBody 〔BlitzLLVM〕
- CreatePhysicsBodyFromEntity 〔BlitzLLVM〕
- CreatePhysicsWorld 〔BlitzLLVM〕
- FreePhysicsWorld 〔BlitzLLVM〕
- GetPhysicsAngularDamping 〔BlitzLLVM〕
- GetPhysicsAngularVelocityX 〔BlitzLLVM〕
- GetPhysicsAngularVelocityY 〔BlitzLLVM〕
- GetPhysicsAngularVelocityZ 〔BlitzLLVM〕
- GetPhysicsAwake 〔BlitzLLVM〕
- GetPhysicsBaumgarte 〔BlitzLLVM〕
- GetPhysicsBodyMotion 〔BlitzLLVM〕
- GetPhysicsBodyShape 〔BlitzLLVM〕
- GetPhysicsBodyWorld 〔BlitzLLVM〕
- GetPhysicsContactSlop 〔BlitzLLVM〕
- GetPhysicsContinuous 〔BlitzLLVM〕
- GetPhysicsContinuousDefault 〔BlitzLLVM〕
- GetPhysicsDeterministic 〔BlitzLLVM〕
- GetPhysicsFriction 〔BlitzLLVM〕
- GetPhysicsGravityScale 〔BlitzLLVM〕
- GetPhysicsGravityX 〔BlitzLLVM〕
- GetPhysicsGravityY 〔BlitzLLVM〕
- GetPhysicsGravityZ 〔BlitzLLVM〕
- GetPhysicsLayer 〔BlitzLLVM〕
- GetPhysicsLinearDamping 〔BlitzLLVM〕
- GetPhysicsLinearVelocityX 〔BlitzLLVM〕
- GetPhysicsLinearVelocityY 〔BlitzLLVM〕
- GetPhysicsLinearVelocityZ 〔BlitzLLVM〕
- GetPhysicsMaskHigh 〔BlitzLLVM〕
- GetPhysicsMaskLow 〔BlitzLLVM〕
- GetPhysicsMass 〔BlitzLLVM〕
- GetPhysicsMaxDelta 〔BlitzLLVM〕
- GetPhysicsMaxSteps 〔BlitzLLVM〕
- GetPhysicsMode 〔BlitzLLVM〕
- GetPhysicsPositionIterations 〔BlitzLLVM〕
- GetPhysicsRate 〔BlitzLLVM〕
- GetPhysicsRestitution 〔BlitzLLVM〕
- GetPhysicsSensor 〔BlitzLLVM〕
- GetPhysicsSleepThreshold 〔BlitzLLVM〕
- GetPhysicsSolver 〔BlitzLLVM〕
- GetPhysicsSpeculativeDistance 〔BlitzLLVM〕
- GetPhysicsSubsteps 〔BlitzLLVM〕
- GetPhysicsThreads 〔BlitzLLVM〕
- GetPhysicsVelocityIterations 〔BlitzLLVM〕
- GetPhysicsWorldSleeping 〔BlitzLLVM〕
- PhysicsAngularDamping 〔BlitzLLVM〕
- PhysicsAngularVelocity 〔BlitzLLVM〕
- PhysicsApplyAngularImpulse 〔BlitzLLVM〕
- PhysicsApplyForce 〔BlitzLLVM〕
- PhysicsApplyForceAt 〔BlitzLLVM〕
- PhysicsApplyImpulse 〔BlitzLLVM〕
- PhysicsApplyImpulseAt 〔BlitzLLVM〕
- PhysicsApplyTorque 〔BlitzLLVM〕
- PhysicsBaumgarte 〔BlitzLLVM〕
- PhysicsBodyMotion 〔BlitzLLVM〕
- PhysicsBodyWorld 〔BlitzLLVM〕
- PhysicsContactSlop 〔BlitzLLVM〕
- PhysicsContinuous 〔BlitzLLVM〕
- PhysicsContinuousDefault 〔BlitzLLVM〕
- PhysicsDeterministic 〔BlitzLLVM〕
- PhysicsFriction 〔BlitzLLVM〕
- PhysicsGravity 〔BlitzLLVM〕
- PhysicsGravityScale 〔BlitzLLVM〕
- PhysicsLayer 〔BlitzLLVM〕
- PhysicsLinearDamping 〔BlitzLLVM〕
- PhysicsLinearVelocity 〔BlitzLLVM〕
- PhysicsMass 〔BlitzLLVM〕
- PhysicsMaxDelta 〔BlitzLLVM〕
- PhysicsMaxSteps 〔BlitzLLVM〕
- PhysicsMode 〔BlitzLLVM〕
- PhysicsPositionIterations 〔BlitzLLVM〕
- PhysicsRate 〔BlitzLLVM〕
- PhysicsRestitution 〔BlitzLLVM〕
- PhysicsSensor 〔BlitzLLVM〕
- PhysicsSleeping 〔BlitzLLVM〕
- PhysicsSleepThreshold 〔BlitzLLVM〕
- PhysicsSolver 〔BlitzLLVM〕
- PhysicsSpeculativeDistance 〔BlitzLLVM〕
- PhysicsSubsteps 〔BlitzLLVM〕
- PhysicsThreads 〔BlitzLLVM〕
- PhysicsUpdate 〔BlitzLLVM〕
- PhysicsVelocityIterations 〔BlitzLLVM〕
- PhysicsWake 〔BlitzLLVM〕
- PhysicsWorldSleeping 〔BlitzLLVM〕
Sprites (7)
Surfaces (29)
- Overview
- AddTriangle
- AddVertex
- ClearSurface
- CountSurfaces
- CountTriangles
- CountVertices
- CreateSurface
- FindSurface
- GetSurface
- PaintSurface
- TriangleVertex
- UpdateNormals
- VertexAlpha
- VertexBlue
- VertexColor
- VertexCoords
- VertexGreen
- VertexNormal
- VertexNX
- VertexNY
- VertexNZ
- VertexRed
- VertexTexCoords
- VertexU
- VertexV
- VertexW
- VertexX
- VertexY
- VertexZ
Textures (51)
- Overview
- AtlasTexture
- ClearTextureFilters
- CreateSampler 〔BlitzLLVM〕
- CreateTexture
- FreeSampler 〔BlitzLLVM〕
- FreeTexture
- GetSamplerAddressModeU 〔BlitzLLVM〕
- GetSamplerAddressModeV 〔BlitzLLVM〕
- GetSamplerAddressModeW 〔BlitzLLVM〕
- GetSamplerAnisotropy 〔BlitzLLVM〕
- GetSamplerBorderColorA 〔BlitzLLVM〕
- GetSamplerBorderColorB 〔BlitzLLVM〕
- GetSamplerBorderColorG 〔BlitzLLVM〕
- GetSamplerBorderColorR 〔BlitzLLVM〕
- GetSamplerFilterMag 〔BlitzLLVM〕
- GetSamplerFilterMin 〔BlitzLLVM〕
- GetSamplerFilterMip 〔BlitzLLVM〕
- GetSamplerLodBias 〔BlitzLLVM〕
- GetSamplerLodMax 〔BlitzLLVM〕
- GetSamplerLodMin 〔BlitzLLVM〕
- LoadAnimTexture
- LoadAtlas
- LoadTexture
- PositionTexture
- RotateTexture
- SaveTexture 〔BlitzLLVM〕
- ScaleTexture
- SetCubeFace
- SetCubeMode
- SetSamplerAddressModeU 〔BlitzLLVM〕
- SetSamplerAddressModeV 〔BlitzLLVM〕
- SetSamplerAddressModeW 〔BlitzLLVM〕
- SetSamplerAnisotropy 〔BlitzLLVM〕
- SetSamplerBorderColor 〔BlitzLLVM〕
- SetSamplerFilterMag 〔BlitzLLVM〕
- SetSamplerFilterMin 〔BlitzLLVM〕
- SetSamplerFilterMip 〔BlitzLLVM〕
- SetSamplerLodBias 〔BlitzLLVM〕
- SetSamplerLodMax 〔BlitzLLVM〕
- SetSamplerLodMin 〔BlitzLLVM〕
- SetTextureSampler 〔BlitzLLVM〕
- TextureBlend
- TextureBuffer
- TextureCoords
- TextureFilter
- TextureFrameDelay
- TextureFrames
- TextureHeight
- TextureName
- TextureReady 〔BlitzLLVM〕
- TextureWidth
World (20)
BlitzPlus
- Overview
Gadgets (50)
- Overview
- ActivateGadget
- AddGadgetItem
- ButtonState
- ClearGadgetItems
- CountGadgetItems
- CreateButton
- CreateComboBox
- CreateHtmlView 〔BlitzLLVM〕
- CreateLabel
- CreateListBox
- CreatePanel
- CreateProgBar
- CreateSlider
- CreateTabber
- DisableGadget
- EnableGadget
- FreeGadget
- GadgetFont
- GadgetGroup
- GadgetHeight
- GadgetItemText
- GadgetText
- GadgetWidth
- GadgetX
- GadgetY
- HideGadget
- HtmlViewBack 〔BlitzLLVM〕
- HtmlViewCurrentURL 〔BlitzLLVM〕
- HtmlViewEventURL 〔BlitzLLVM〕
- HtmlViewForward 〔BlitzLLVM〕
- HtmlViewGo 〔BlitzLLVM〕
- HtmlViewRun 〔BlitzLLVM〕
- HtmlViewStatus 〔BlitzLLVM〕
- InsertGadgetItem
- ModifyGadgetItem
- RemoveGadgetItem
- SelectedGadgetItem
- SelectGadgetItem
- SetButtonState
- SetGadgetFont
- SetGadgetLayout
- SetGadgetShape
- SetGadgetText
- SetPanelColor
- SetPanelImage
- SetSliderRange
- SetSliderValue
- ShowGadget
- SliderValue
- UpdateProgBar