DX9: How to update non-dynamic texture when format is not supported by CreateOffScreenPlainSurface

DX9: How to update non-dynamic texture when format is not supported by CreateOffScreenPlainSurface

Post by Jan Boelsc » Tue, 13 May 2003 21:36:17



My target graphics device (a Radeon 7000) claims to support
D3DFORMAT_UYVY textures. This turned out to be true, unless I specify
D3DUSAGE_DYNAMIC, for
which CreateTexture fails.
So I cannot load pixels to the texture by locking/unlocking.

The only way left to load pixel data to the texture is either
UpdateTexture / UpdateSurface or StretchRect.

But now I discovered that the board does not support
off-screen-plain-surfaces
with a format of D3DFORMAT_UYVY.

So I only can create D3DPOOL_SCRATCH surfaces as a source surface to
UpdateSurface / StretchRect. However D3DPOOL_SCRATCH surfaces are not
supported by these methods.

What am I missing? How can I update a texture when I cannot create
Off-Screen-Plain-Surfaces of the same format and can't create the
texture as D3DUSAGE_DYNMAIC? There must be a way, otherwise the
YUV-texture feature would be ueseless...

Please help!

Thanks,
  Jan

 
 
 

DX9: How to update non-dynamic texture when format is not supported by CreateOffScreenPlainSurface

Post by Rich [Microsoft Direct3D MV » Wed, 14 May 2003 01:29:05


[Please do not mail me a copy of your followup]



Quote:>The only way left to load pixel data to the texture is either
>UpdateTexture / UpdateSurface or StretchRect.

So what's wrong with UpdateTexture?
--
    "The Direct3D Graphics Pipeline"-- code samples, sample chapter, FAQ:
              <http://www.xmission.com/~legalize/book/>