The way I learnt to send a texture to a shader is more or less
//Use program
//Bind texture to the texture unit to its appropriate target
glActiveTexture(GL_TEXTURE0 + texture_unit);
glBindTexture(target, textureID);
//Get the uniform location in the program and attach the texture unit
GLuint location = /*get the location somewhow*/;
glUniform1i(location,texture_unit);
However when dealing with buffers and SSBOS rather than trying to find a location throughthrough a string anmename, the object is declared as:
layout(std430, binding = 2) buffer texture_meta_data
For example. This means that the SSBO is to ebbe bound at binding point 2
And then on tehthe C++ side one does something like
glBindBufferBase(GL_SHADER_STORAGE_BUFFER, 2, SSBOID);
To bind the object to tha bidningthe binding point.
How can you do the same with textures?