How to copy texture1 to texture2 efficiently?
问题 I want to copy texture1 to texture2. The most stupid way is copying tex1 data from GPU to CPU, and then copy CPU data to GPU. The stupid code is as below: float *data = new float[width*height*4]; glBindTexture(GL_TEXTURE_2D, tex1); glGetTexImage(GL_TEXTURE_2D, 0, GL_RGBA, GL_FLOAT, data); glBindTexture(GL_TEXTURE_2D, tex2]); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA32F, width, height, 0, GL_RGBA, GL_FLOAT, data); As I know, it must exist a method that supports data copying from GPU tex to GPU