I tried to use ofShader in my program.
In the fragment shader, I use sampler2D rather than sampler2DRect to fetch from textures .
But it always turns out wrong.
Then i checked the source code of ofShader, ofTexture and ofTextureData and found that ofTextureData::textureTarget was always GL_TEXTURE_RECTANGLE. Then I tried to modify it by GL_TEXTURE2D at runtime, but my shader didn’t run correctly neither. Does it means I can only fetch texture using sampler2DRect in shaders?
If it is true currently, I strongly suggest that the code to be revised to accomodate the use of any texture target types in shaders, which are GL_TEXTURE_1D, GL_TEXTURE_2D, GL_TEXTURE_3D, GL_TEXTURE_1D_ARRAY, GL_TEXTURE_2D_ARRAY, GL_TEXTURE_RECTANGLE, GL_TEXTURE_CUBE_MAP, GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_BUFFER, GL_TEXTURE_2D_MULTISAMPLE or GL_TEXTURE_2D_MULTISAMPLE_ARRAY.