Skip to main content
GameDev.net gamedev.net
🔒 Locked 🎮 Unity

Direct3D.Device.Lights[0] Index out of range exception

Started by caesar4 Jan 17, 2008 at 1:32 AM 0 replies 900+ views
Original Post
caesar4
caesar4
This is one of the weirdest errors I've come across I subversion everything I have so when I when to an earlier version where lighting DID work, I still got the exception anyways it happens when I try


this.pDev.Lights[0].Diffuse = Color.White;
this.pDev.Lights[0].Type = LightType.Point;
this.pDev.Lights[0].Position = this.vecLightPos;
this.pDev.Lights[0].Enabled = true;
this.pDev.Lights[0].Update();


and the exception is IndexOutOfRangeException, but the problem is, the Device.Lights property is read only, so I can't create it, and I cant add lights to it
Cartman's definition of sexual harrasement:"When you are trying to have intercourse with a lady friend, and some other guy comes up and tickles your balls from behind"(watch South Park, it rocks)
caesar4
caesar4
[bump]
Cartman's definition of sexual harrasement:"When you are trying to have intercourse with a lady friend, and some other guy comes up and tickles your balls from behind"(watch South Park, it rocks)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.