Loading a texture into a multi frame texture?
Blitz3D Forums/Blitz3D Programming/Loading a texture into a multi frame texture?
| ||
Hi, I have a multi frame texture, i.e. texture2 = CreateTexure(64,64,12,2) ; 2 frames... How do I load a texture from disk into say the first frame? I sort of want to do somehting like... texture2(0) = LoadTexture("texture2") |
| ||
This should work. Not sure if the original texture width needs to be 128 ( for 2xframes ) or left at 64. Hope this helps. Texture = CreateTexture( 128,64,12,2 ) ;assume Tex1 is 64x64 Tex1 = LoadTexture( "Texture1" ) CopyRect 0,0,64,64,0,0,TextureBuffer( Tex1 ), TextureBuffer( Texture ) FreeTexture Tex1 ;assume Tex2 is 64x64 Tex2 = LoadTexture( "Texture2" ) CopyRect 0,0,64,64,64,0,TextureBuffer( Tex2 ), TextureBuffer( Texture ) FreeTexture Tex2 |