while trying to optimize Landscape v9 I realized that StartDrawing(TextureOutput(i)) was taking a long time
on my config , 10 textures of 2048 x 2048 take 3s
(note: there is not this problem in directx, the creation of textures is instantaneous)
in the code I display the time taken by createtexture and createimage
note : the comparison is not relevant, but the difference of ratio between the different configurations can be interesting
(it is probably normal that createtexture is slower (creation of MIP-MAP, access to the graphic memory...)
thank you for posting the content of the debugger
Code: Select all
InitEngine3D():InitSprite()
OpenWindow(0, 0,0,100,100,"")
OpenWindowedScreen(WindowID(0), 0, 0, WindowWidth(0), WindowHeight(0), 0, 0, 0)
t0=ElapsedMilliseconds()
For i=1 To 10
CreateTexture(i,2048,2048)
StartDrawing(TextureOutput(i))
StopDrawing()
Next
t1=ElapsedMilliseconds()-t0
Debug "texture:"+#TAB$+t1
t0=ElapsedMilliseconds()
For i=1 To 10
CreateImage(i,2048,2048,32)
StartDrawing(ImageOutput(i))
StopDrawing()
Next
t2=ElapsedMilliseconds()-t0
Debug "image:"+#TAB$+t2
Debug "ratio:"+#TAB$+FormatNumber(t1/t2,1)
Debug "OS: "+OSVersion()+#TAB$+" PB: "+#PB_Compiler_Version
texture: 2835
image: 46
ratio: 61.6
OS: 120 PB: 601