[osg-users] Draw Elements Instanced Shader Help

2011-10-26 Thread Pecoraro, Alexander N
I can't figure out why the shader embedded in the attached file doesn't work without the hard coded position and scale variables. I'm trying to write a hardware instancing shader that uses glDrawElementsInstancedEXT() to draw multiple instances of a box where the position and scale of the box

Re: [osg-users] Draw Elements Instanced Shader Help

2011-10-26 Thread Paul Martz
On 10/26/2011 12:49 PM, Pecoraro, Alexander N wrote: Any idea what Im doing wrong? Have you tried looking at the osgdrawinstanced example to see how your code differs from functioning code? -- -Paul Martz Skew

Re: [osg-users] Draw Elements Instanced Shader Help

2011-10-26 Thread Sergey Polischuk
Hi, Alexander Try to use uniforms with names appended with "[0]" for uniform arrays, like InstanceScales[0] instead of InstanceScales.Cheers.26.10.2011, 22:49, "Pecoraro, Alexander N" alexander.n.pecor...@lmco.com:I can’t figure out why the shader embedded in the attached file doesn’t work without

Re: [osg-users] Draw Elements Instanced Shader Help

2011-10-26 Thread Sergey Polischuk
Also you can declare #version 110  in both shaders, fix any errors that appears and see if it makes any difference (this can be useful on nvidia cards) 26.10.2011, 22:52, "Pecoraro, Alexander N" alexander.n.pecor...@lmco.com:I can’t figure out why the shader embedded in the attached file doesn’t