Original Post
Hi, I have a 2D texture and I want to copy a portion of it into an array for further processing. At the moment I am retrieving the whole of the texture into an array using the following code: The problem is that I am retrieving the whole texture into an array where as I only need a subset of it (a rectangular region), starting from position (x, y) with offset (xOffset, yOffset). Is there any openGL method that makes it possible? best withes
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, txNormalsMapMesh);
glGetTexImage(GL_TEXTURE_2D, 0, GL_RGBA, GL_FLOAT, tempdata2);