What is an easy way to use a tile-textures map (with fx 4 rows and 4 column of sprites), with the billboard texture animation?
I have made an effect system, which right now uses billboard texture animation. But the problem is that each frame is stored in seperate files, and loaded into an array.
I like to combine the spritemap method, so that i can look up the frames for the billboards in ONE map instead.
So is there a way to speficy a position from a file when i load the textures?
There are a method to load an image from data (createImageFromData). Maybe this could be used to load an image from a region, and later feed this to the addTexture metod??
Billboard animated textures from a sprite / tile map
Thanks. Sounds like the solution i need.
But when i access the getTextureMatrix(0) I begin to get assertions in the ireferencecounted.h file.
I have tried to just assign the matrix to a variable, and not doing anything else like shown here.
The debugger breaks here:
_IRR_DEBUG_BREAK_IF(ReferenceCounter <= 0) // someone is doing bad reference counting.
--ReferenceCounter;
if (!ReferenceCounter)
{
delete this;
return true;
}
So it seems that something is going on in getTextureMatrix(0), which does some erronous referencecounting. Or i am doing something wrong.
Do you know what is gong on?
But when i access the getTextureMatrix(0) I begin to get assertions in the ireferencecounted.h file.
I have tried to just assign the matrix to a variable, and not doing anything else like shown here.
Code: Select all
matrix4 m = effect->getMaterial(0).getTextureMatrix(0);
_IRR_DEBUG_BREAK_IF(ReferenceCounter <= 0) // someone is doing bad reference counting.
--ReferenceCounter;
if (!ReferenceCounter)
{
delete this;
return true;
}
So it seems that something is going on in getTextureMatrix(0), which does some erronous referencecounting. Or i am doing something wrong.
Do you know what is gong on?