Re: [PyOpenGL-Users] Checking Shader Errors
Brought to you by:
mcfletch
From: Gijs <in...@bs...> - 2009-04-20 17:58:52
|
Ian Mallett wrote: > Yes, this was basically what I came up with. > > The problem turns out to be that for gl_LightSource[n], n must be a > literal int or const int. I'm not sure why this could be. Ideas? > > I solved the problem by passing the light source itself to the function. > > There's a few more other problems, but it's mostly done. > > Ian I have run into a similar problem regarding indexes of arrays like these. I tried to index gl_FragColor using a variable. Something which the Mac OS X driver doesn't like at all. So I unrolled the for-loop and used const integers instead of variables. However, I only saw this problem when I was using my mac. In Windows and Linux it worked like a charm, both using the ATI 9.3 drivers. In Linux the 9.2 driver actually crashed when I used arrays like this. So I don't really know what your problem is, but it could be driver or videocard related. See if updating your drivers fixes any problems. Regards, Gijs |