Hi Frank,
entity system currently supports just diffuse and ambient color for light.
So you create light like usually, using TBGL_EntitySetColor (this is hybrid function for all entities) you set diffuse color of that light, and using TBGL_EntitySetAmbient you can set ambient color.
Light range (in meaning light is applied only in radius) can be done only via shaders, hardware lights work with the attenuation equation. That means light never reaches zero propagation, it just becomes weaker and weaker.
Spotlight is easy to do, when you look in help file, you can see you can specify which type of light you need - point, directional or spotlight. Spotlight can have specified angle and sort of attenuation factor called border fade.
So only thing not implemented now is attenuation and specular part of the light, will see what I can do
Bookmarks