loadanimtexture

Blitz3D Forums/Blitz3D Programming/loadanimtexture

danjo(Posted 2004) [#1]
when you loadanimtexture, does the texture get sliced up into seperate images for it to use..
ie 640x640 image into 5x5 (128x128 pixel) images.
reason i ask is using a large image and older gfx cards cant handle more than 512x512 - is this still ok.


_PJ_(Posted 2004) [#2]
Yes - well, the command actually allows you to enter height/width of each frame no's as parameters.

If Ive read your question right.


danjo(Posted 2004) [#3]
yes- i know that, but is blitz processing the image as a lot of 128x128 images for that example.


DrakeX(Posted 2004) [#4]
i believe it treats the frames as separate textures. try this:

Graphics3D 800,600
SetBuffer BackBuffer()

cam=CreateCamera()
PositionEntity cam,0,0,-5
light=CreateLight()
RotateEntity light,45,45,0

img=CreateImage(128,64)
SetBuffer ImageBuffer(img)
Color 255,0,0
Rect 0,0,64,64
Color 0,0,255
Rect 64,0,64,64
SetBuffer BackBuffer()
SaveImage img,"c:\blitz3d\test.bmp"
FreeImage img

t=LoadAnimTexture("c:\blitz3d\test.bmp",1+8,64,64,0,2)
s=CreateCube()
EntityTexture s,t,0
PositionTexture t,0.25,0

Repeat
	UpdateWorld
	RenderWorld
	Flip
Until KeyHit(1)

DeleteFile "c:\blitz3d\test.bmp"

End


you'll notice that even if i position the texture, the cube's still all red, meaning that the blue part is in another texture entirely. however positiontexture seems to position all frames of a texture..

to tell the truth, i've never quite figured out the point of LoadAnimTexture. unless you were able to just change the "active" frame of the texture, it's useless. they don't really help much with animated textures, except that you can place all the frames in one file. hmm.


danjo(Posted 2004) [#5]
thats answered the question. i was a bit worried, that by using a texture greater than 512x512 may not work on some older video cards.