Sign in to follow this  
alpha44

Why in my computer, MaxActiveLights = -1 or 0 ?!

Recommended Posts

alpha44    136
Hi I have a question about MaxActiveLights: "Directx Caps Viewer" shows that MaxActiveLights = -1 !! Obviously its impossible to have -1 lights. So I was thinking what does this -1 indicate. And the only explanation that I came up with was this: DirectX Help : "For a given physical device, this capability (MaxActiveLights) might vary across Device objects, depending on the parameters supplied to the Device constructor." So we cant say what is the value of MaxActiveLights before we now how many devices we have and what parameters do they have? And therefore "Directx Caps Viewer" shows this -1 to indicate the ambiguity of the value? And I have another question with regard to this: when I use this code to ascertain the value of MaxActiveLights in my program: Direct3D.Caps cp = new Direct3D.Caps(); MessageBox.Show(cp.MaxActiveLights.ToString()); The value that I get is 0!! Why is that? (I have tested this practically and I have been able to create 3 or 4 lights, and maybe I could have made more lights (active lights) if I wanted to, so obviously MaxActiveLights = 0, doesnt make any sense.) Thanks in advance.

Share this post


Link to post
Share on other sites
MaxActiveLights of 0 or -1 are indicative of software processing. Software processing having no limitations can support an infinite number of lights. INT32 doesn't support a way to return "infinite", but 0 and -1 will do the job fine, so long as you expect them.

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