View Full Version : two general glsl questions
08-13-2006, 04:25 AM
1) it seems that a shader has to be activated if you want to set uniforms and attributes for it - why? (ati, winxp, latest drivers)
2) are the values of uniforms saved when the shader is deactivated and activated again? as an example, is it save to tell a shader only once that the normal map is in texture slot 1 or will i have to do it every frame?
08-13-2006, 05:09 AM
1) Uniform and attribute locations are be different for every shader - you must select one before accessing it's uniforms. This should change in upcoming versoins of OpenGL.
2) Yes - uniforms do not change until you change it.
08-13-2006, 05:52 AM
Uniform and attribute locations are be different for every shader - you must select one before accessing it's uniforms. This should change in upcoming versoins of OpenGL.ok but when you want to change a uniform, then you have to specify the shader's handle - isn't that enough information? well, let's hope it's changed :)
08-13-2006, 08:03 AM
when you want to change a uniform, then you have to specify the shader's handleNot really:
let's hope it's changedThere is an article here about new object model:
08-13-2006, 08:37 AM
d'oh you're right. i'm always using those two functions together, so i confused it.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.