Jump to content
  • Advertisement
Sign in to follow this  

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

This topic is 4966 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!