   Duplicate Texture
  I'm wondering what the best way is to duplicate a texture that has already been uploaded to texture memory. Is there some way of reading the pixel data and creating a new texture with that data? Or should reloading the file from disk be faster, even if it needs to be decompressed?   
  If I attach it to an FBO, can I read from it with glReadPixels()?   ;  Why do you want to duplicate a texture? Surely you would have some sort of operation to perform on one of the copies? We'll be able to give you more helpful if less direct advice if we know that.   ;  Look into glGetTexture() to get the image data from a texture object. HTH   ;  Hmmm, that sounds interesting. Amazingly enough, google only gives me 7 unique hits for "glGetTexture" one of which is a thread with a post by me. Do you have the prototype for the function?   ;Quote:Original post by BoderHmmm, that sounds interesting. Amazingly enough, google only gives me 7 unique hits for "glGetTexture" one of which is a thread with a post by me. Do you have the prototype for the function?Try glGetTexImage rather than glGetTexture.   ;  Thank you for the help.I don't know if I'm going to use this yet, but I was implementing a DuplicateTex function just in case I didn't want two objects sharing the texture.I can't really think of a reason now. I needed it for SDL because modifying the alpha changed the actual surface, but in GL of course it is just the alpha of the vertex that gets affected, not the texture data.Maybe it would be useful if doing texture splatting?   ;  glGetTexImage() downloads pixels data from VRAM to your system memory. Once in system memory, you have to create & upload the new texure manually (glBindtexture(), glTexImage()).Using FBOs copies the texture data (pixels) within VRAM only:- setup & bind FBO- setup destination texture (using glTexImage() w/ pixels = 0)- add (blank but sized) destination texture as color attachment- bind source texture to texture target- draw quad w/ glTexCoors describing src area, projection/modelview matrices & glVertexes describing dst area-> make sure to check your alpha, blend, depth, stencil, etc. ops; shaders may be used for custom per-fragment operations)Cheers!;  Cheers!I'll remember that technique.   