Resource management

Blitz3D Forums/Blitz3D Programming/Resource management

Warren(Posted 2003) [#1]
Would I be right in thinking that ...

img1 = LoadImage("blah.bmp")
img2 = LoadImage("blah.bmp")
img3 = LoadImage("blah.bmp")

... will only load "blah.bmp" one time internally? Or does Blitz load 3 seperate copies of "blah.bmp"?


GfK(Posted 2003) [#2]
That'll load three separate copies. Run this with debug on:
DebugLog AvailVidMem()
img1 = LoadImage("image.bmp")
DebugLog AvailVidMem()
img2 = LoadImage("image.bmp")
DebugLog AvailVidMem()
img3 = LoadImage("image.bmp")
DebugLog AvailVidMem()
It does manage textures better. If you load the same texture twice with the same flags, you still only have one texture loaded. If you load the same texture twice with different flags, you have two textures in memory.