Hi, On Tue, 2012-04-24 at 01:25 +0200, Volker Settgast wrote: > On 23.04.2012 19:05, Carsten Neumann wrote: > > Hello Volker, > > > > On 04/23/2012 11:36 AM, Volker Settgast wrote: > >> as I understand, OSG sorts the draw tree by material to minimize the > >> state changes. This works perfectly for “normal” materials. I created a > >> simple test scene with n objects and one material and get just one state > >> change. > >> > >> But as soon as I and a shaderprogram chunk to the material, the > >> statistics overlay reports n state changes with n = number of matrix > >> changes. So it seems that there is a state change for every object even > >> if only one material is used in the whole scene. > >> > >> Is that a bug? > > just a quick check: is this with an up-to-date OpenSG2? Gerrit > > cleaned-up the statistics last week and I'm wondering if the issue you > > are seeing was just a matter or wrongly counted statistics. > > > > > > Hi, > > yes, I just pulled the current version to be sure. The effect is still > the same. I added the test scene - before and after the shader chunk is > added to the material.
I'll check, shaders are a little tricky as they might contain object dependent variables so they might have to run through the var part even if the shader program is not switched, which means to a certain extend the state changing has to be processed. kind regards gerrit ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Opensg-users mailing list Opensg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensg-users