-// sets all textures bound to an image unit (multiple can be non-zero at once, according to OpenGL rules the highest one overrides the others)
-void R_Mesh_TexBindAll(unsigned int unitnum, int tex2d, int tex3d, int texcubemap, int texrectangle);
-// equivalent to R_Mesh_TexBindAll(unitnum,tex2d,0,0,0)
-void R_Mesh_TexBind(unsigned int unitnum, int texnum);
+// copies a section of the framebuffer to a 2D texture
+void R_Mesh_CopyToTexture(rtexture_t *tex, int tx, int ty, int sx, int sy, int width, int height);
+// bind a given texture to a given image unit
+void R_Mesh_TexBind(unsigned int unitnum, rtexture_t *tex);