Hi, all. This is a problem I encountered this weekend. Don´t know if anybody else had this mentioned before.
The following Code results in 495 FPS when running on my PC (ATHLON XP 1900+, GeForce4 TI4400, NForce v6.6.93, B3D v1.90) within the IDE. After compiling to an EXE (DEBUG ON or OFF doesn´t matter) it will give me only 325 FPS. I don´t understand. Any ideas?
AppTitle "FPS Speed Test"
Graphics3D 1024, 768, 32,2
SetBuffer BackBuffer()
HidePointer
Global Camera = CreateCamera()
Light = CreateLight()
Cube = CreateCube()
PositionEntity Cube, 0, 0, 5
tex = CreateTexture(128, 128)
SetBuffer TextureBuffer(tex)
ClsColor 255,255,255
Cls
SeedRnd(MilliSecs())
For k = 1 To 50
Color Rand(256), Rand(256), Rand(256)
Rect Rand(128), Rand(128), Rand(128), Rand(128)
Next
EntityTexture Cube, tex
SetBuffer BackBuffer()
Color 255, 255, 255
FPS = 0
Ticks = 0
Timer = MilliSecs() + 1000
While Not KeyDown(1)
TurnEntity Cube, 0.05, 0.05, 0.05
UpdateWorld
RenderWorld
Ticks = Ticks + 1
If MilliSecs() >= Timer Then
FPS = Ticks
Ticks = 0
Timer = MilliSecs() + 1000
End If
Text 2, 2, "FPS: " + Str$(FPS)
Flip False
Delay 2
Wend
ShowPointer
EndGraphics
End
The following Code results in 495 FPS when running on my PC (ATHLON XP 1900+, GeForce4 TI4400, NForce v6.6.93, B3D v1.90) within the IDE. After compiling to an EXE (DEBUG ON or OFF doesn´t matter) it will give me only 325 FPS. I don´t understand. Any ideas?
AppTitle "FPS Speed Test"
Graphics3D 1024, 768, 32,2
SetBuffer BackBuffer()
HidePointer
Global Camera = CreateCamera()
Light = CreateLight()
Cube = CreateCube()
PositionEntity Cube, 0, 0, 5
tex = CreateTexture(128, 128)
SetBuffer TextureBuffer(tex)
ClsColor 255,255,255
Cls
SeedRnd(MilliSecs())
For k = 1 To 50
Color Rand(256), Rand(256), Rand(256)
Rect Rand(128), Rand(128), Rand(128), Rand(128)
Next
EntityTexture Cube, tex
SetBuffer BackBuffer()
Color 255, 255, 255
FPS = 0
Ticks = 0
Timer = MilliSecs() + 1000
While Not KeyDown(1)
TurnEntity Cube, 0.05, 0.05, 0.05
UpdateWorld
RenderWorld
Ticks = Ticks + 1
If MilliSecs() >= Timer Then
FPS = Ticks
Ticks = 0
Timer = MilliSecs() + 1000
End If
Text 2, 2, "FPS: " + Str$(FPS)
Flip False
Delay 2
Wend
ShowPointer
EndGraphics
End