diff options
| author | Ray <[email protected]> | 2017-01-27 23:03:08 +0100 |
|---|---|---|
| committer | Ray <[email protected]> | 2017-01-27 23:03:08 +0100 |
| commit | 37a64df7b9944d1d24872f07a7e713884b33432e (patch) | |
| tree | 27be09012466a24e6996062a52fc557974ec7bab /src/models.c | |
| parent | 7b5f61ddf782f53348184e3d6ecc9cfbb889f018 (diff) | |
| download | raylib-37a64df7b9944d1d24872f07a7e713884b33432e.tar.gz raylib-37a64df7b9944d1d24872f07a7e713884b33432e.zip | |
Move lighting system out of raylib
Lighting is implemented as a raylib example now
Diffstat (limited to 'src/models.c')
| -rw-r--r-- | src/models.c | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/src/models.c b/src/models.c index 0673874b..23c2e6fd 100644 --- a/src/models.c +++ b/src/models.c @@ -574,43 +574,6 @@ void DrawGizmo(Vector3 position) rlPopMatrix(); } - -// Draw light in 3D world -void DrawLight(Light light) -{ - switch (light->type) - { - case LIGHT_POINT: - { - DrawSphereWires(light->position, 0.3f*light->intensity, 8, 8, (light->enabled ? light->diffuse : GRAY)); - - DrawCircle3D(light->position, light->radius, (Vector3){ 0, 0, 0 }, 0.0f, (light->enabled ? light->diffuse : GRAY)); - DrawCircle3D(light->position, light->radius, (Vector3){ 1, 0, 0 }, 90.0f, (light->enabled ? light->diffuse : GRAY)); - DrawCircle3D(light->position, light->radius, (Vector3){ 0, 1, 0 },90.0f, (light->enabled ? light->diffuse : GRAY)); - } break; - case LIGHT_DIRECTIONAL: - { - DrawLine3D(light->position, light->target, (light->enabled ? light->diffuse : GRAY)); - - DrawSphereWires(light->position, 0.3f*light->intensity, 8, 8, (light->enabled ? light->diffuse : GRAY)); - DrawCubeWires(light->target, 0.3f, 0.3f, 0.3f, (light->enabled ? light->diffuse : GRAY)); - } break; - case LIGHT_SPOT: - { - DrawLine3D(light->position, light->target, (light->enabled ? light->diffuse : GRAY)); - - Vector3 dir = VectorSubtract(light->target, light->position); - VectorNormalize(&dir); - - DrawCircle3D(light->position, 0.5f, dir, 0.0f, (light->enabled ? light->diffuse : GRAY)); - - //DrawCylinderWires(light->position, 0.0f, 0.3f*light->coneAngle/50, 0.6f, 5, (light->enabled ? light->diffuse : GRAY)); - DrawCubeWires(light->target, 0.3f, 0.3f, 0.3f, (light->enabled ? light->diffuse : GRAY)); - } break; - default: break; - } -} - // Load mesh from file Mesh LoadMesh(const char *fileName) { @@ -751,17 +714,6 @@ Material LoadDefaultMaterial(void) return material; } -// Load standard material (uses material attributes and lighting shader) -// NOTE: Standard shader supports multiple maps and lights -Material LoadStandardMaterial(void) -{ - Material material = LoadDefaultMaterial(); - - material.shader = GetStandardShader(); - - return material; -} - // Unload material from memory void UnloadMaterial(Material material) { |
