Is it possible to send Texture Buffer to shader dynamically?
These:

glTexBuffer(GL_TEXTURE_BUFFER, GL_R32I, this-&gt;index_tbo);



uniform samplerBuffer index_tex;


Do not match. If the texture is a signed integer texture, then the sampler type needs to match. It should be isamplerBuffer, and you won't need to do the cast.