UnloadTexture did not set texture id to NULL.
This commit is contained in:
@@ -67,6 +67,7 @@ Detailed changes:
|
|||||||
- FIXED: Vector3RotateByAxisAngle was not connected.
|
- FIXED: Vector3RotateByAxisAngle was not connected.
|
||||||
- FIXED: uluaGetBoundingBoxIndex was looking for numbers instead of tables.
|
- FIXED: uluaGetBoundingBoxIndex was looking for numbers instead of tables.
|
||||||
- ADDED: IsTextureReady
|
- ADDED: IsTextureReady
|
||||||
|
- FIXED: UnloadTexture did not set texture id to NULL.
|
||||||
|
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
Release: ReiLua version 0.4.0 Using Raylib 4.2
|
Release: ReiLua version 0.4.0 Using Raylib 4.2
|
||||||
|
|||||||
1
devnotes
1
devnotes
@@ -1,4 +1,5 @@
|
|||||||
Current {
|
Current {
|
||||||
|
* Review GenMeshCustom indices.
|
||||||
}
|
}
|
||||||
|
|
||||||
Backlog {
|
Backlog {
|
||||||
|
|||||||
@@ -1251,7 +1251,6 @@ int lcoreSetShaderValueTexture( lua_State *L ) {
|
|||||||
lua_pushboolean( L, false );
|
lua_pushboolean( L, false );
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
// SetShaderValueTexture( *state->shaders[ shaderId ], locIndex, *state->textures[ textureId ] );
|
|
||||||
SetShaderValueTexture( *state->shaders[ shaderId ], locIndex, *texturesGetSourceTexture( textureId ) );
|
SetShaderValueTexture( *state->shaders[ shaderId ], locIndex, *texturesGetSourceTexture( textureId ) );
|
||||||
lua_pushboolean( L, true );
|
lua_pushboolean( L, true );
|
||||||
|
|
||||||
|
|||||||
@@ -122,13 +122,13 @@ void stateFree() {
|
|||||||
for ( int i = 0; i < state->imageCount; ++i ) {
|
for ( int i = 0; i < state->imageCount; ++i ) {
|
||||||
if ( state->images[i] != NULL ) {
|
if ( state->images[i] != NULL ) {
|
||||||
UnloadImage( *state->images[i] );
|
UnloadImage( *state->images[i] );
|
||||||
free( state->images[i] );
|
// free( state->images[i] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for ( int i = 0; i < state->textureCount; ++i ) {
|
for ( int i = 0; i < state->textureCount; ++i ) {
|
||||||
if ( state->textures[i] != NULL ) {
|
if ( state->textures[i] != NULL ) {
|
||||||
texturesFreeTexture(i);
|
texturesFreeTexture(i);
|
||||||
free( state->textures[i] );
|
// free( state->textures[i] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for ( int i = 0; i < state->fontCount; ++i ) {
|
for ( int i = 0; i < state->fontCount; ++i ) {
|
||||||
|
|||||||
@@ -111,6 +111,7 @@ void texturesFreeTexture( size_t id ) {
|
|||||||
UnloadRenderTexture( state->textures[id]->renderTexture );
|
UnloadRenderTexture( state->textures[id]->renderTexture );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
state->textures[id] = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
@@ -1746,9 +1747,7 @@ int ltexturesUnloadTexture( lua_State *L ) {
|
|||||||
lua_pushboolean( L, false );
|
lua_pushboolean( L, false );
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
// UnloadTexture( *state->textures[ id ] );
|
|
||||||
texturesFreeTexture( texId );
|
texturesFreeTexture( texId );
|
||||||
// state->textures[ id ] = NULL;
|
|
||||||
lua_pushboolean( L, true );
|
lua_pushboolean( L, true );
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user