Help Understanding LoadAnimTexture Parameters
Blitz3D Forums/Blitz3D Beginners Area/Help Understanding LoadAnimTexture Parameters
| ||
I'm trying to understand the parameters of LoadAnimTexture, but the manual is not helping. For example it gives this code as an example. ; Load anim texture anim_tex=LoadAnimTexture( "media/boomstrip.bmp",49,64,64,0,39 ) I understand the last four digits logically must be the frame_width, frame_height, first_frame and frame_count parameters, but I don't know what the first number 49 is. If I can understand this, then I might be able to understand why this code from a tutorial I am using returns a '"memory access violation" error: Anim_tex = LoadAnimTexture ("char_back.png", 7, 32, 48, 0, 4) ; |
| ||
LoadAnimTexture ( file$,flags,frame_width,frame_height,first_frame,frame_count ) flags (optional) - texture flag: 1: Color (default) 2: Alpha 4: Masked 8: Mipmapped 16: Clamp U 32: Clamp V 64: Spherical reflection map 128: Cubic environment map 256: Store texture in vram 512: Force the use of high color textures frame_width - width of each animation frame frame_height - height of each animation frame first_frame - the first frame to be used as an animation frame frame_count - the amount of frames to be used I guess the flag=49 means "Clamp U + Clamp V + Color" (I don't know if the texture dimensions can be arbitrary, or if it needs to be a power-of-two size?) |
| ||
Thanks You said, you guess, but that's just what I am doing in this case, and don't want to do. I just need a bit of help in understanding how the parameters work, since the manual doesn't go into detail. That way, I will know what I am doing. Can you give a detailed explanation on them? |
| ||
Oh, I didn't see the code above. Thanks xlsior. I get it. The parameters are added to give the number. Now I understand. Than you very much. |
| ||
By the way. How did you get your code blue? I was looking for the tabs to do that, and don't see them. |
| ||
There's forum tags: <code> ... </code> (Change the angle brackets to square brackets for it to work: < to [ For long pieces of code, you can also use <codebox> which will condense it to a smaller scrollable box. |
| ||
There is more information about the flags at CreateTexture(). |
| ||
This forum, like many others, supports formatting parts of your post when you use special tags like xlsior demonstrated. For the remaining tags, see here: Home -> FAQ -> Website -> What are the forum codes |
| ||
Thanks all. |
| ||
Hi, I am behind you on this. What does the picture/mesh file look like? I use wings3d and have done movement in 2d bmax. Are the mesh files four or more pictures in a row? This cube thing is interesting. Is this how animation is done? Six figures in a cube view? I would appreciate any basic info you have. Thanks, Gerald Nelson |