I have encountered a problem with OpenGL/GLSL as the following message,
error C5041: cannot locate suitable resource to bind parameter ...
I have searched this forum, and several hints said it is related to the
too many varables. I don’t think this is my problem.
My code is simple, but the fragment shader is a little bit longer, as,
uniform sampler3D texDiffDat; uniform sampler2DRect texGrad; uniform sampler2DRect texRandMatrix; uniform sampler2DRect texCanvas1; uniform sampler2DRect texCanvas2; uniform sampler2DRect texCanvas3; #define numDirect 90 #define imgW 4 #define imgH 4 .... gl_FragData = ... .... gl_FragData = ... //Totaly draw 6 buffers
I have tested my NVIDIA card for Quadro NVS 140M with the latest driver,
OpenGL 3.2/gLSL 1.5, and it has 8 draw buffers maxime. With OS win XP, Visual
Another test is on NVIDIA Quadro FX1700 card (both on WIN32 and Ubuntu9.10,
all with the latest driver), but the same errors appear.
Actually, in order to test the program, I specifically set the image(texture)
very small, 2D (imgWimgH) and 3D (imgWimgH*numDirect). So it won’t overload
the GPU mem at all.
A real situation is, my shader is a little bit longer, about 600 lines (C-style),
but it doesn’t have too much local arrays or vectors, expcept some single float
or int varables. Does it has limit for the indications in the shader ?
Could some friends give me some suggestions?