CreateLight method
Implementation
@override
LightD CreateLight(
LightType type,
Vector3D position,
Vector3D target,
ColorD color,
ShaderD shader,
) => run(
() => RaylibDebugLabels.CreateLight(type, position, target, color, shader),
() {
int index = _lightCount++;
final light = LightD(
enabled: true,
type: type,
position: position.copy(),
target: target.copy(),
color: color.copy(),
);
light.enabledLoc = rl.CoreD.GetShaderLocation(shader, "lights[$index].enabled");
light.typeLoc = rl.CoreD.GetShaderLocation(shader, "lights[$index].type");
light.positionLoc = rl.CoreD.GetShaderLocation(shader, "lights[$index].position");
light.targetLoc = rl.CoreD.GetShaderLocation(shader, "lights[$index].target");
light.colorLoc = rl.CoreD.GetShaderLocation(shader, "lights[$index].color");
UpdateLightValues(shader, light);
rl.Temp.Light$.PointerTo(light, '_RaylibLight_$index');
return light;
},
);