Entity Light and Entity Camera suggestions
I recently had an issue with mixing "Entity" items and the RawGL versions of the same code. I believe you explained it perfectly, when you said, "You should not mix RawGL control with Entity control items."
In short... "Entities" are a controlled set of RawGL, as I understand it. I was sending conflicting controls to a controlled item. Specifically, "Lighting" and "Perspective".
However, some control elements are not available, at the moment, which is what led me to using RawGL commands. Lighting seems to have a default "Ambient", and the control entity does not offer control of "Specular" and "Diffuse". The camera also has a limitation of using the "Fixed field of view", or "Perspective".
Looking through the commands for entities...
You already have the...
TBGL_EntitySetColor
TBGL_EntitySetCutoff
Why not just add...
TBGL_EntitySetAmbient
TBGL_EntitySetSpecular
TBGL_EntitySetDiffuse
Specific to the light-entity control.
Color would just be a generic version of Specular&Diffuse as one value...
Just trying to suggest what I would imagine I would have to type or search for, if I did not have the help-file at my disposal. (Some of the "Custom" commands don't always make sense to me.)
One thought about light-limitations and control, which could be done semi-automatically, or optionally as a setting...
For entity control of lights... could you just calculate the 8-nearest to Active-Camera? Which would allow hundreds of scene lights, but only the 8 nearest you would be turned-on. (Which I imagine the user would normally be doing in the programming. Such as quake, where lights are in a zone, and they program zone-control to turn lights on and off. But they also setup MAX-Lights to 32, which is a little much, but would be handy.)
On that same respect...
For Cameras... you don't allow "TBGL_EntitySetScale"...
On a camera, the "Scale" is the zoom-factor. Why not just use that as the input for FOV. You would only have to mention, in the help-file... "Scale for a camera element is the zoom (FOV)."
The normal scale for an entity is...
(Entity, x, y, z)
However, Camera scale could be...
(Entity, ANGLE) {Ratio L/W auto set to screen ratio, EG-optional} {Distance=Viewdistance, EG-not used}
or
(Entity, ANGLE, L/W-ratio) {Distance=Viewdistance, EG-not used}
Using the same function, but it would have a specific operation for a camera entity.