raylib-d Create Light Sources
    jwatson-CO-edu 
    real.name at colorado.edu
       
    Thu Dec  1 00:56:04 UTC 2022
    
    
  
I am attempting to recreate the [Raylib flat shading 
tutorial](https://www.raylib.com/examples/shaders/loader.html?name=shaders_basic_lighting) with raylib-d.  I have been able to find most of the necessary wrappers except the one the creates light sources. How do I create light sources in raylib-d?
```d
uint MAX_LIGHTS = 4;
//...
Light[MAX_LIGHTS] lights; // Error: undefined identifier `Light`
lights[0] = CreateLight(
     LIGHT_POINT, Vector3( -2, 1, -2 ), Vector3Zero(), 
Colors.YELLOW, shader
);
lights[1] = CreateLight(
     LIGHT_POINT, Vector3( 2, 1, 2 ), Vector3Zero(), Colors.RED, 
shader
);
lights[2] = CreateLight(
     LIGHT_POINT, Vector3( -2, 1, 2 ), Vector3Zero(), 
Colors.GREEN, shader
);
lights[3] = CreateLight(
     LIGHT_POINT, Vector3( 2, 1, -2 ), Vector3Zero(), Colors.BLUE, 
shader
);
```
    
    
More information about the Digitalmars-d-learn
mailing list