Anonymous user
Image noise: Difference between revisions
m
→{{header|PureBasic}}: Increased FPS by running without synchronization
m (→{{header|PureBasic}}: Update to 320x240 and showing output) |
m (→{{header|PureBasic}}: Increased FPS by running without synchronization) |
||
Line 248:
=={{header|PureBasic}}==
<lang PureBasic>#filter=0.
#UpdateFreq=100 ; How often to update the FPS-display
InitSprite()
Repeat▼
OpenWindowedScreen(WindowID(0),0,0,w,h,1,0,0,#PB_Screen_NoSynchronization)
▲ Define x, y, dT, T, TOld, FloatingMedium.f, cnt
Repeat
StartDrawing(ScreenOutput())
For y=0 To h-1
▲ Define w=WindowWidth(0), h=WindowHeight(0)
For x=0 To
If
FlipBuffers()
▲ StopDrawing()
cnt+1
TOld=T: T=ElapsedMilliseconds()▼
If cnt>=#UpdateFreq
▲ cnt+1
▲ Repeat
Event=WindowEvent()
▲ SetWindowTitle(0,"PureBasic: "+StrF(FloatingMedium,2)+" fps.")
▲ EndIf
EndIf
▲ Until Event=#PB_Event_CloseWindow
[[Image:Image_Noise_in_PureBasic.png]]
|