Wasted Time
Blitz3D Forums/Blitz3D Programming/Wasted Time
| ||
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 |
| ||
maybe it has something to do with debuglog ? |
| ||
Yeah remove the debuglog and make print stuff to screen for a test. could be that. |
| ||
Hi, It's ok now bye |
| ||
what? no explanation?! I feel like I just walked out of Matrix Revolutions... They didn't explain everything at the end there either. :) |
| ||
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. |
| ||
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 :) |