Realtime visual benchmark (VBL & Rasterlines)
Re: Realtime visual benchmark (VBL & Rasterlines)
Thanks to fig (in this topic http://www.purebasic.fr/english/viewtop ... 57#p502057), modified to compile both on x86 and x64
Re: Realtime visual benchmark (VBL & Rasterlines)
thank you, very interesting. i didn't know they measured instruction time in pixels but it makes sense.
Re: Realtime visual benchmark (VBL & Rasterlines)
Insert the code to display the current FPS:
Code: Select all
;---- BENCHMARK END
StartDrawing(ScreenOutput())
;************** for FPS************
FrameCounter + 1
Now = GetTickCount_() ; possible replacement ElapsedMilliseconds() ?
If (Now-Ticks) > 999
Ticks = Now
FramePerSec.s = "FPS: " + Str( FrameCounter )
FrameCounter = 0
EndIf
DrawText(2,2, FramePerSec )
;**************************************
DrawingMode(#PB_2DDrawing_Transparent)
Re: Realtime visual benchmark (VBL & Rasterlines)
I get, when using 32 or 64, 5.60 beta2 or not; an invalid memory access at line 71:
Code: Select all
CreateSprint(0, 64, 64)
Re: Realtime visual benchmark (VBL & Rasterlines)
Thank you ! I've implemented it with ElapsedMilliseconds().kvitaliy wrote:Insert the code to display the current FPS:
Code: Select all
;---- BENCHMARK END StartDrawing(ScreenOutput()) ;************** for FPS************ FrameCounter + 1 Now = GetTickCount_() ; possible replacement ElapsedMilliseconds() ? If (Now-Ticks) > 999 Ticks = Now FramePerSec.s = "FPS: " + Str( FrameCounter ) FrameCounter = 0 EndIf DrawText(2,2, FramePerSec ) ;************************************** DrawingMode(#PB_2DDrawing_Transparent)
I've downloaded and tested it with 5.60 beta3 and I have no problem. The CreateSprite() should work, it's not a hack, like are some other parts of the code. Do you have tested with debugger enabled ? What is your configuration ?Damion12 wrote:I get, when using 32 or 64, 5.60 beta2 or not; an invalid memory access at line 71:Code: Select all
CreateSprint(0, 64, 64)
Re: Realtime visual benchmark (VBL & Rasterlines)
well that is weird, I used the external debugger & it ran! weird. I'll try reinstalling pb.djes wrote: Do you have tested with debugger enabled ? What is your configuration ?