Archived

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

SikCiv

Same D3D8Texture src and dest blit?

Recommended Posts

SikCiv    122
Blitting from one D3D8Texture to another works fine with CopyRect (using ->GetSurfaceLevel), though when I blit to the same texture (src and dest the same) it returns D3DERR_INVALIDCALL. Is there a way to do this? Or would I have to create a temporary working surface and use it for storing the data for blitting back?

  Downloads:  ZeroOne Realm

Share this post


Link to post
Share on other sites
SikCiv    122
Doh..I forgot to mention...

The source and dest rects are different, and from what I have gathered D3D8 works with dirty rects, so really you should be able to lock two parts of the same texture with different R/W attributes..right? or is this a limitation within DX?

The routine needs to be done every frame, so I cant really create a texture 75 times a frame. I guess the only way to do it is if I create 2 textures initially, one as the source data, and the other as the update texture...though I''m going to have to alloc more vidmem and re-code a few routines and variables

  Downloads:  ZeroOne Realm

Share this post


Link to post
Share on other sites
CrazedGenius    156
just curious - what are you trying to do? Could there be a different way of accomplishing the same thing?

(For instance, if you''re rendering into a texture and then blitting, you could just render to a texture twice...)

Share this post


Link to post
Share on other sites
SikCiv    122
What I''m trying to do is convert my Gfx lib from DDraw to D3D, most of it is done, though my graphical dialog system is designed to use one surface for the source and dest-update surface. It was working ok in DDraw, but since D3D has blitting limits. I know what I need to do to fix the problem, though its going to involve alot of re-coding Which is why I wandered if there was an alternative.

  Downloads:  ZeroOne Realm

Share this post


Link to post
Share on other sites