diff --git a/changelog b/changelog index 26e60a0..7965c8a 100644 --- a/changelog +++ b/changelog @@ -39,6 +39,8 @@ DETAILED CHANGES: - CHANGE: UpdateTexture and UpdateTextureRec now take pixel data as Buffer. - ADDED: Blend modes example. - FIXED: uluaPushTransform translation field name fix. + - FIXED: Added rlDisableShader for SetShaderValue* functions to prevent bugs. + Should be removed if added back in raylib. ------------------------------------------------------------------------ Release: ReiLua version 0.8.0 Using Raylib 5.0 and Forked Raygui 4.0 diff --git a/src/core.c b/src/core.c index 543dda8..a688f0a 100644 --- a/src/core.c +++ b/src/core.c @@ -1131,6 +1131,7 @@ int lcoreSetShaderValueMatrix( lua_State* L ) { Matrix mat = uluaGetMatrix( L, 3 ); SetShaderValueMatrix( *shader, locIndex, mat ); + rlDisableShader(); /* Remove this if added in raylib. Can cause bugs if not disabled. */ return 0; } @@ -1146,6 +1147,7 @@ int lcoreSetShaderValueTexture( lua_State* L ) { Texture* texture = uluaGetTexture( L, 3 ); SetShaderValueTexture( *shader, locIndex, *texture ); + rlDisableShader(); /* Remove this if added in raylib. Can cause bugs if not disabled. */ return 0; } @@ -1188,6 +1190,7 @@ int lcoreSetShaderValue( lua_State* L ) { else { SetShaderValue( *shader, locIndex, ints, uniformType ); } + rlDisableShader(); /* Remove this if added in raylib. Can cause bugs if not disabled. */ return 0; }