Unload functions clear object to 0 so they would not be ready in Is*Ready.
This commit is contained in:
@@ -188,6 +188,7 @@ int ltextureUnloadImage( lua_State* L ) {
|
||||
Image* image = uluaGetImage( L, 1 );
|
||||
|
||||
UnloadImage( *image );
|
||||
memset( image, 0, sizeof( Image ) );
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1296,6 +1297,7 @@ int ltextureUnloadTexture( lua_State* L ) {
|
||||
Texture* texture = uluaGetTexture( L, 1 );
|
||||
|
||||
UnloadTexture( *texture );
|
||||
memset( texture, 0, sizeof( Texture ) );
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1324,6 +1326,7 @@ int ltextureUnloadRenderTexture( lua_State* L ) {
|
||||
RenderTexture* target = uluaGetRenderTexture( L, 1 );
|
||||
|
||||
UnloadRenderTexture( *target );
|
||||
memset( target, 0, sizeof( RenderTexture ) );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user