Wasted Time

Blitz3D Forums/Blitz3D Programming/Wasted Time

ZJP(Posted 2003) [#1]
Hi all,

After a few minutes, the time of render increases without reason.

Run this code in debug mode.

;+++++++++++++++++Blitz Code +++++++++++++++++
Graphics3D 640,480,16,2
; from 'Tron'. (decord)

grid_tex=CreateTexture( 32,32,8 )
ScaleTexture grid_tex,10,10
SetBuffer TextureBuffer( grid_tex )
Color 0,0,64:Rect 0,0,32,32
Color 0,0,255:Rect 0,0,32,32,False
SetBuffer BackBuffer()

grid_plane=CreatePlane()
EntityTexture grid_plane,grid_tex
EntityBlend grid_plane,1
EntityAlpha grid_plane,.6
EntityFX grid_plane,1

mirror=CreateMirror()
;++++++++++++++++++++++++++++++++++++++++++++++++++++++

Global CUBE = CreateCube()
EntityColor cube,255,0,0
PositionEntity cube,0,5,0

Global camera_pivot = CreatePivot(CUBE)
Global camera = CreateCamera(camera_pivot)
plabe=CreatePlane()

PositionEntity camera,0,2,5

While Not KeyHit(1)
; Delta Time
DT#= MilliSecs() - Old_Time
Old_Time=MilliSecs()
DT# = DT# / 1000
;++++++++++++++++++ Capture +++++++++++++++++++++
update=Not update
If Not update Then
CaptureWorld
DebugLog "Capture "+DT#+" "+TrisRendered()
;+++++++++++++++++++ Mise a jour +++++++++++++++++
Else
PointEntity camera,cube
MoveEntity cube,0,0,0.2
UpdateWorld
RenderWorld
DebugLog "Update/Render "+DT#+" "+TrisRendered()
Flip
EndIf
Wend
;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

16 Faces, 1 Entity, 1 Move ?????

Bye


jfk EO-11110(Posted 2003) [#2]
maybe it has something to do with debuglog ?


Litobyte(Posted 2003) [#3]
Yeah remove the debuglog and make print stuff to screen for a test. could be that.


ZJP(Posted 2003) [#4]
Hi,

It's ok now

bye


Kanati(Posted 2003) [#5]
what? no explanation?! I feel like I just walked out of Matrix Revolutions... They didn't explain everything at the end there either. :)


Warren(Posted 2003) [#6]
I feel like I just walked out of Matrix Revolutions... They didn't explain everything at the end there either. :)

Matrix Revolutions is the best litmus test since Reloaded.


Ross C(Posted 2003) [#7]
The program was constantly writing to the debuglog it looks like. You code will slow-down if there is alot of debuglog writing. That's what it looks like to me :)