Some tweaks
It seems there are some problems with DrawLights()
This commit is contained in:
parent
9811a37690
commit
48374c85dd
@ -17,7 +17,6 @@
|
|||||||
********************************************************************************************/
|
********************************************************************************************/
|
||||||
|
|
||||||
#include "raylib.h"
|
#include "raylib.h"
|
||||||
#include "raymath.h"
|
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
@ -35,14 +34,14 @@ int main()
|
|||||||
Vector3 position = { 0.0f, 0.0f, 0.0f }; // Set model position
|
Vector3 position = { 0.0f, 0.0f, 0.0f }; // Set model position
|
||||||
|
|
||||||
Model dwarf = LoadModel("resources/model/dwarf.obj"); // Load OBJ model
|
Model dwarf = LoadModel("resources/model/dwarf.obj"); // Load OBJ model
|
||||||
Texture2D texDiffuse = LoadTexture("resources/model/dwarf_diffuse.png"); // Load model diffuse texture
|
|
||||||
|
|
||||||
Material material = LoadStandardMaterial();
|
Material material = LoadStandardMaterial();
|
||||||
material.texDiffuse = texDiffuse;
|
material.texDiffuse = LoadTexture("resources/model/dwarf_diffuse.png"); // Load model diffuse texture
|
||||||
material.colDiffuse = (Color){255, 255, 255, 255};
|
material.colDiffuse = (Color){255, 255, 255, 255};
|
||||||
material.colAmbient = (Color){0, 0, 10, 255};
|
material.colAmbient = (Color){0, 0, 10, 255};
|
||||||
material.colSpecular = (Color){255, 255, 255, 255};
|
material.colSpecular = (Color){255, 255, 255, 255};
|
||||||
material.glossiness = 50.0f;
|
material.glossiness = 50.0f;
|
||||||
|
|
||||||
dwarf.material = material; // Apply material to model
|
dwarf.material = material; // Apply material to model
|
||||||
|
|
||||||
Light spotLight = CreateLight(LIGHT_SPOT, (Vector3){3.0f, 5.0f, 2.0f}, (Color){255, 255, 255, 255});
|
Light spotLight = CreateLight(LIGHT_SPOT, (Vector3){3.0f, 5.0f, 2.0f}, (Color){255, 255, 255, 255});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user