array of sampler

purpledog

Newcomer
I cannot get that line to work in a glsl shader:

uniform sampler2d texArray[3];

the shader compiles but glUniformiv is failing... Any idea?
 
That's not legal AFAIR.
There's an extension with sampler2d arrays, don't remember its name, but a quick OpenGL Registry Extension check should allow you to find it.
 
Well, it's sampler2D, with capital D. Did you get a proper uniform location returned, or -1?
 
glUniform1iv crashes (see callstack):

the location is fine (4)

Here is the exact line I tried:

uniform sampler2DRect texTest[5];




nvoglnt.dll!6964fb20()
[Frames below may be incorrect and/or missing, no symbols loaded for nvoglnt.dll]
nvoglnt.dll!6964fb63()
nvoglnt.dll!696504c5()
nvoglnt.dll!695e07a8()
nvoglnt.dll!69548e2c()
visionstuff.exe!gl::glUniform(int location=4, int count=2, const int * v0=0x00dafdd8) Line 130 + 0x17 bytes C++
 
Back
Top