LinkCode:/* Set viewport so it matches the size of our texture*/ glViewport(0,0,1024,1024); /* Target texture */ glBindTexture(GL_TEXTURE_2D, tex); /* Copy screen to a 1024x1024 texture */ glCopyTexImage2D(GL_TEXTURE_2D,0,GL_RGB,0,0,1024,1024,0);
and that's it I think