diff options
| author | jussi | 2022-05-21 17:30:26 +0300 |
|---|---|---|
| committer | jussi | 2022-05-21 17:30:26 +0300 |
| commit | 85fc6cd6a3865f19ceac448dcb33b0c19b8e6b77 (patch) | |
| tree | 57bdd1f3bb78ba6d5d5a8d224cadd87799301afa /src | |
| parent | 043fd7269827f368691fb861effe7eafb5f85122 (diff) | |
| download | reilua-enhanced-85fc6cd6a3865f19ceac448dcb33b0c19b8e6b77.tar.gz reilua-enhanced-85fc6cd6a3865f19ceac448dcb33b0c19b8e6b77.tar.bz2 reilua-enhanced-85fc6cd6a3865f19ceac448dcb33b0c19b8e6b77.zip | |
Some doc fixes.
Diffstat (limited to 'src')
| -rw-r--r-- | src/models.c | 6 | ||||
| -rw-r--r-- | src/state.c | 2 |
2 files changed, 5 insertions, 3 deletions
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(); |
