Reviewed example PR
This commit is contained in:
parent
dad6f8eeaa
commit
f992dd73c9
|
|
@ -25,6 +25,8 @@
|
|||
#define GLSL_VERSION 120
|
||||
#endif
|
||||
|
||||
#include <stdlib.h> // Required for: NULL
|
||||
|
||||
#define MAX_LIGHTS 4 // Max dynamic lights supported by shader
|
||||
int lightsCount; // Current number of dynamic lights that have been created
|
||||
|
||||
|
|
@ -186,7 +188,9 @@ int main()
|
|||
// Draw
|
||||
//----------------------------------------------------------------------------------
|
||||
BeginDrawing();
|
||||
|
||||
ClearBackground(BLACK);
|
||||
|
||||
BeginMode3D(camera);
|
||||
|
||||
SetShaderValue(shader, textureTilingLoc, &floorTiling, SHADER_UNIFORM_VEC2);
|
||||
|
|
@ -214,9 +218,10 @@ int main()
|
|||
if (lights[i].enabled) DrawSphereEx(lights[i].position, 0.2f, 8, 8, col);
|
||||
else DrawSphereWires(lights[i].position, 0.2f, 8, 8, ColorAlpha(col, 0.3f));
|
||||
}
|
||||
|
||||
EndMode3D();
|
||||
|
||||
DrawText("(c) Old Rusty Car model by Renafox (https://skfb.ly/LxRy)", screenWidth - 320, screenHeight - 20, 10, GRAY);
|
||||
DrawText("(c) Old Rusty Car model by Renafox (https://skfb.ly/LxRy)", screenWidth - 320, screenHeight - 20, 10, LIGHTGRAY);
|
||||
DrawFPS(10, 10);
|
||||
|
||||
EndDrawing();
|
||||
|
|
@ -228,8 +233,8 @@ int main()
|
|||
//--------------------------------------------------------------------------------------
|
||||
model.materials[0].shader = (Shader){ 0 };
|
||||
floor.materials[0].shader = (Shader){ 0 };
|
||||
UnloadMaterial(model.materials[0]); // Unload PBRMaterial
|
||||
UnloadMaterial(floor.materials[0]); // Unload PBRMaterial
|
||||
UnloadMaterial(model.materials[0]);
|
||||
UnloadMaterial(floor.materials[0]);
|
||||
model.materials[0].maps = NULL;
|
||||
floor.materials[0].maps = NULL;
|
||||
UnloadModel(floor); // Unload model
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user