PDA

View Full Version : Shading several objects



garmonbozia
12-11-2004, 10:53 PM
How can I draw several objects, some with shading and the remaining without or with another shading?

THX for help.

Lurker_pas
12-11-2004, 11:27 PM
All you have to do is to bind another shader ( glUseProgramObjectARB(ShaderId)) for each of these objects (shader 0 for those without shading). It could be a good idea to group objects with the same shader so that you could reduce the number of switches. Or in some specific cases you could write a single big supershader containing smaller ones and controll its execution with uniforms. I hope that's the answer you sought...

garmonbozia
12-11-2004, 11:57 PM
Thanks,it's realy work.