Does anyone know if using LoadTexture multiple times with the same texture will actually create seperate buffers for each texture or is just internally pointing to the first one?
LoadTexture?
Blitz3D Forums/Blitz3D Programming/LoadTexture? It will only load the texture once, unless you try to load the texture with different flags.
If the texture flags are identical each time, Blitz3D seems to point to the same texture buffer:
a=LoadTexture("d:\t.jpg");1+8 b=LoadTexture("d:\t.jpg");1+8 c=LoadTexture("d:\t.jpg",1+8+16+32) Print TextureBuffer(a);same Print TextureBuffer(b);same Print TextureBuffer(c);different
It's actually annoying this :o) If you want to try and load two different versions. Have you tried loading one, then creating a new texture, then copy rect the contents into the blank texture? Or Read/Write pixel fast to preserve alpha info.
Actually this is a feature in the context of my game project. I want to stream in 3D content. The content is itself is so lite that loads very fast, but there is a lot of it in 1 game session and I don't want to load it all at once. I was just wondering because I don't want to have some flag for every texture to make sure that the same texture isn't already in memory.