# Copying a texture

**URL:** <https://discourse.libsdl.org/t/copying-a-texture/20905>\
**Category:** SDL Development\
**Created:** [August 14, 2014, 3:20pm UTC](https://discourse.libsdl.org/t/copying-a-texture/20905 "2014-08-14T15:20:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andreas\_Falkenhahn](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/a/f9ae1b/32.png) [@Andreas\_Falkenhahn](https://discourse.libsdl.org/u/Andreas_Falkenhahn)\
**Post date:** [August 14, 2014, 3:20pm UTC](https://discourse.libsdl.org/t/copying-a-texture/20905/1 "2014-08-14T15:20:44Z")

</div>

Hi,

what’s the suggested way of copying a texture? I know I can use SDL\_RenderCopy()  
in case the target texture is of type SDL\_TEXTUREACCESS\_TARGET. But what if the  
target texture is of type SDL\_TEXTUREACCESS\_STATIC/STREAMING? Do I have to use  
the slow SDL\_RenderReadPixels() on the source texture first and then jam the pixels  
down to the target texture by using SDL\_UpdateTexture()/SDL\_LockTexture() or  
is there a faster way to make an independent copy of a SDL\_TEXTUREACCESS\_STATIC/STREAMING  
texture?

Tks–  
Best regards,  
Andreas Falkenhahn mailto:@Andreas_Falkenhahn
