mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-07-03 06:24:32 +00:00
Refactor texture loading code; should fix a crash that started appearing recently.
This commit is contained in:
parent
66cf20ffa9
commit
f0d580d873
22 changed files with 255 additions and 387 deletions
|
@ -83,18 +83,14 @@ public:
|
|||
|
||||
static RenderObjectLayer *rlayer;
|
||||
|
||||
enum AddRefChoice { NO_ADD_REF = 0, ADD_REF = 1};
|
||||
|
||||
void setTexturePointer(Texture *t, AddRefChoice addRefChoice)
|
||||
void setTexturePointer(CountedPtr<Texture> t)
|
||||
{
|
||||
this->texture = t;
|
||||
if (addRefChoice == ADD_REF)
|
||||
texture->addRef();
|
||||
onSetTexture();
|
||||
}
|
||||
|
||||
void setStateDataObject(StateData *state);
|
||||
void setTexture(const std::string &name);
|
||||
bool setTexture(const std::string &name);
|
||||
|
||||
void toggleAlpha(float t = 0.2);
|
||||
void matrixChain();
|
||||
|
@ -239,7 +235,7 @@ public:
|
|||
InterpolatedVector offset, rotationOffset, internalOffset, beforeScaleOffset;
|
||||
InterpolatedVector velocity, gravity;
|
||||
|
||||
Texture *texture;
|
||||
CountedPtr<Texture> texture;
|
||||
|
||||
//int mode;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue