Ive sat down and played with this more and I have some stripped down code people can try:
#include <DarkSDK.h>
void DarkSDK(void)
{
dbSyncOn();
dbMakeObjectCone(1, 500);
dbPositionObject(1, 0, 0, 0);
dbMakeLight(1);
dbSetDirectionalLight(1, 0, 0, 0);
//dbPositionLight(1, 0, 0, 0);
dbPointLight(1, 0, -40, 0);
//dbMakeObjectCone(1, 500);
while(LoopSDK())
{
if(dbEscapeKey()) break;
dbControlCameraUsingArrowKeys(0, 0.1f, 0.1f);
dbSync();
}
dbDeleteObject(1);
dbDeleteLight(1);
}
Interestingly enough, if I change the cone ID to something other than 1, it works. If I make the cone after the light, it works. If I dont call dbPointLight(), it works. But if I make the cone then make the light with the same ID and call dbPointLight(), the cone does not render. At least it doesnt render where it is supposed to. And it doesnt seem to matter if I call any of the other light functions. One might think that not setting the light to spot or directional might be the cause but it doesnt seem to matter. And thats as far as Im willing to test this. I think its enough to show something is wrong.