Sign in to follow this  

D9 Point light is not supported on vista??

Recommended Posts

hi: There is a demo. But when i get it run on vista, all of the things turn out to be white, i change the light type to directional , the color returns. But i want point light, not directional. What's under the hood?? Thanks!!

Share this post

Link to post
Share on other sites
Yes, is supported. There's a little code in slimdx.

SlimDX.Vector3 vv3;

this.Device.EnableLight(0, true); //enable light
SlimDX.Direct3D9.Light light = new SlimDX.Direct3D9.Light();
light.Ambient = Color.Gray;
light.Diffuse = System.Drawing.Color.White;
vv3 = this.Player.Position;
vv3.Y += 0.5f;
light.Position = vv3;
light.Range = 5;
light.Type = SlimDX.Direct3D9.LightType.Point;
this.Device.SetLight(0, luz);

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this