Am 24.07.2014 um 09:28 schrieb Till Oliver Knoll <till.oliver.kn...@gmail.com>:
> ... > In recent (OpenGL >= 4.1?) shader versions there is also a "layout" (or > "location") qualifier, so you can save the call to glUniform1i - but the > exact syntax escapes me right now. >From the "OpenGL SuperBible": layout (binding = 0) uniform sampler2D foo; layout (binding = 1) uniform sampler2D bar; etc. This is the preferred way of assigning sampler uniforms to texture units (the "binding" values in the shader code above refer off course to the texture units that you "activated" (glActiveTexture) previously before "binding" your textures in your application). Cheers, Oliver _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest