• Advertisement

Archived

This topic is now archived and is closed to further replies.

Textures and source rectangles

This topic is 5995 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How can I copy from a specific area on a texture? You know like it was possible to blit from a specific area on a surface in DirectDraw, is it possible to blit from a specific source rectangle on a texture? -René

Share this post


Link to post
Share on other sites
Advertisement
Yes, use texture coordinates other than 0.0 and 1.0. for instance, coords (0.0, 0.0) and (0.5, 0.5) will use only the upper quarter of the texture. (0.25, 0.25) and (0.75, 0.75) will use the middle of the texture.

Share this post


Link to post
Share on other sites
Or you can use IDirect3DTexture8::GetSurfaceLevel() to retrieve the LPDIRECT3DSURFACE8 then use CopyRects() to copy regions of the surface to another

Share this post


Link to post
Share on other sites

  • Advertisement