I have a 2D texture with a known internal format. I’d like to use it’s pixels as vertex attributes for farther GL processing.
I can compute the texture coordinate in the vertex shader & fetch a sample. No problems here, but it is a fall-back solution.
I can create PBO, attach the texture to FBO and call glGetTexImage, reading the contents in the buffer object asynchronously. Then rebind this object as VBO & bind attributes as usual. Should work in theory, as far as I can see.
Can I use TBO for that? I can attach the texture to the buffer object, but the spec only describes BO->Texture link (the behavior of sampling from the texture), while I need the reverse link.
Any opinions appreciated.