diff options
| -rw-r--r-- | .gitignore | 4 | ||||
| -rw-r--r-- | API.md | 2 | ||||
| -rw-r--r-- | README.md | 12 | ||||
| -rw-r--r-- | src/models.c | 6 | ||||
| -rw-r--r-- | src/state.c | 2 |
5 files changed, 14 insertions, 12 deletions
@@ -1,3 +1 @@ -.vscode -Toolchain-mingw32.cmake -releases
\ No newline at end of file +.vscode
\ No newline at end of file @@ -3412,7 +3412,7 @@ Copies material to model material. ( Model material is the material id in models --- -> success = RL_SetModelMaterial( Model model, Material modelMaterial, Material material ) +> success = RL_SetModelMeshMaterial( Model model, int meshId, int materialId ) Set material for a mesh ( Mesh and material on this model ) @@ -10,7 +10,7 @@ Reilua means fair in finnish. ## Status -ReiLua is currently in version 0.2 and some planned raylib functionality is still missing but it already has over 400 functions. +ReiLua is WIP and some planned raylib functionality is still missing but it already has over 400 functions. Current Raylib version 4.0.0. List of some MISSING features that are planned to be included. For specific function, check API. @@ -75,9 +75,7 @@ Application should now start successfully from executable. All functionality can ## Building -I think the simplest way would be to statically link Raylib and Lua to the same executable. Specially on Linux this would simplify distribution of games since different distros tend to use different versions of librarys. Of course if you plan to only experiment with it, this isn't so important. At the time of writing ReiLua uses latest Raylib version from master branch. If you use Raylib v4.0.0 release, you will get a lot of undefined reference errors. - -//TODO In future these instructions should be set on fixed release versions of Raylib. +I think the simplest way would be to statically link Raylib and Lua to the same executable. Specially on Linux this would simplify distribution of games since different distros tend to use different versions of librarys. Of course if you plan to only experiment with it, this isn't so important. Current Raylib version 4.0.0. https://github.com/raysan5/raylib @@ -152,7 +150,11 @@ Not tested, but I guess it should work similarly to Linux. ### Raspberry Pi -Works best when compiled using PLATFORM=DRM, but Raylib seems to have some problems with the input handling. +Works best when Raylib is compiled using PLATFORM=DRM. See Raylib build instructions for Raspberry Pi. +Compile ReiLua with. +``` +cmake .. -DDRM=ON +``` ### Web diff --git a/src/models.c b/src/models.c index fab32ab..8ad2f2c 100644 --- a/src/models.c +++ b/src/models.c @@ -1808,7 +1808,7 @@ int lmodelsSetModelMaterial( lua_State *L ) { /* Copy material data instead of using pointer. Pointer would result in double free error. */ model->materials[ modelMaterialId ].shader = material->shader; - model->materials[ modelMaterialId ].maps[ MATERIAL_MAP_DIFFUSE ] = material->maps[ MATERIAL_MAP_DIFFUSE ]; + model->materials[ modelMaterialId ].maps[ MATERIAL_MAP_ALBEDO ] = material->maps[ MATERIAL_MAP_ALBEDO ]; model->materials[ modelMaterialId ].maps[ MATERIAL_MAP_METALNESS ] = material->maps[ MATERIAL_MAP_METALNESS ]; model->materials[ modelMaterialId ].maps[ MATERIAL_MAP_NORMAL ] = material->maps[ MATERIAL_MAP_NORMAL ]; model->materials[ modelMaterialId ].maps[ MATERIAL_MAP_ROUGHNESS ] = material->maps[ MATERIAL_MAP_ROUGHNESS ]; @@ -1829,7 +1829,7 @@ int lmodelsSetModelMaterial( lua_State *L ) { } /* -> success = RL_SetModelMaterial( Model model, Material modelMaterial, Material material ) +> success = RL_SetModelMeshMaterial( Model model, int meshId, int materialId ) Set material for a mesh ( Mesh and material on this model ) @@ -2245,7 +2245,7 @@ int lmodelsGetRayCollisionModel( lua_State *L ) { lua_pushnil( L ); return 1; } - uluaPushRayCollision( L, GetRayCollisionModel( ray, *state->models[ modelId ] ) ); + // uluaPushRayCollision( L, GetRayCollisionModel( ray, *state->models[ modelId ] ) ); return 1; } diff --git a/src/state.c b/src/state.c index 860bc45..7a3ba32 100644 --- a/src/state.c +++ b/src/state.c @@ -186,11 +186,13 @@ void stateFree() { free( state->shaders[i] ); } } +#if !defined(PLATFORM_RPI) || !defined(PLATFORM_DRM) for ( int i = 0; i < state->lightCount; ++i ) { if ( state->lights[i] != NULL ) { free( state->lights[i] ); } } +#endif if ( IsAudioDeviceReady() ) { CloseAudioDevice(); |
