Sign in to follow this  
Prune

Is normal matrix recomputed automatically?

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
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
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

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