Hi Robert, Robert Osfield wrote: > I got something similar under Linux with the NVidia drivers (OpenGL > version string: 2.0.2 NVIDIA 87.56) and a 7800GT when running the > osgshaders example: > > Fragment info > ------------- > (41) : error C6013: Only arrays of texcoords may be indexed in this > profile, and only with a loop index variable > (41) : error C6013: Only arrays of texcoords may be indexed in this > profile, and only with a loop index variable > > Changing the index value to a const allowed the compiler to get over > this hurdle, but breaks the functionality... so isn't of much value > other knowing the limits of the compiler.
Those restrictions probably reflect the limitations of the underlying hardware, but in this case may have more flexibility than simply a constant array index; instead sounds like it could emulate indexing by unrolling a for loop or something. Dunno if the loop bounds would have to be constant tho. The take-away message for GLSL developers attempting to create multiplatform code is that array indexing seems very constrained and inconsistently implemented across deployed GPUs/drivers. So if your application depends on GLSL indexing, you'd better test and identify sufficiently-capable hardware. (This probably should go on the wiki somewhere.) Cheers -- mew _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
