Is normal matrix recomputed automatically?
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
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]
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]
I would avoid using gl_NormalMatrix and any other built in stuff if I were you. Even glLoadMatrix should be avoided.
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^^
Because if you are using glLoadMatrix, then that means you are using ftransform() or gl_Projec.... and other junk.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement