Jump to content
  • Advertisement
Sign in to follow this  
Prune

Is normal matrix recomputed automatically?

This topic is 3002 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

If I do a glLoadMatrixf on the modelview matrix in the program, will gl_NormalMatrix be correct in the shader, that is, is it computed automatically any time the projection or modelview are changed? Thanks

Share this post


Link to post
Share on other sites
Advertisement
Sure it does.

But please note that gl_NormalMatrix is supported with compatibility profile only, which should not be a problem for desktop graphics cards since all of them support this profile, and if a graphics card vendor ever tried to stop the support he would lose a massive number of gamers (which are "customers" for them).

This could be a problem for other devices such as mobile platforms, though.

[Edited by - vincoof on March 5, 2010 8:59:30 AM]

Share this post


Link to post
Share on other sites
I would avoid using gl_NormalMatrix and any other built in stuff if I were you. Even glLoadMatrix should be avoided.

Share this post


Link to post
Share on other sites
Quote:
Original post by V-man
I would avoid using gl_NormalMatrix and any other built in stuff if I were you. Even glLoadMatrix should be avoided.


Hm,what's wrong with glLoadMatrix?I've been using it for pretty long time and don't remember that it caused any problems^^

Share this post


Link to post
Share on other sites
Because if you are using glLoadMatrix, then that means you are using ftransform() or gl_Projec.... and other junk.

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!