mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 15:24:55 +08:00
Return the texture while Spine is using it.
This commit is contained in:
parent
3ba9994652
commit
4defc3146a
@ -35,12 +35,14 @@ USING_NS_CC;
|
||||
|
||||
void _spAtlasPage_createTexture (spAtlasPage* self, const char* path) {
|
||||
Texture2D* texture = Director::getInstance()->getTextureCache()->addImage(path);
|
||||
texture->retain();
|
||||
self->rendererObject = texture;
|
||||
self->width = texture->getPixelsWide();
|
||||
self->height = texture->getPixelsHigh();
|
||||
}
|
||||
|
||||
void _spAtlasPage_disposeTexture (spAtlasPage* self) {
|
||||
((Texture2D*)self->rendererObject)->release();
|
||||
}
|
||||
|
||||
char* _spUtil_readFile (const char* path, int* length) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user