Textures and Surfaces? Another SDK error :(

Started by
1 comment, last by SikCiv 22 years, 10 months ago
Basically what I''m trying to do is copy a part of a texture located in SysMem to a texture in VidMem. The SDK docs are incorrect concerning the texture routines, it mentions you can use device->CopyRects(..) to copy a texture to another texture, but its clearly meant for Surfaces only, which really only leaves UpdateTexture to be used, but when I use it, it returns D3DERR_INVALIDCALL so im left in the cold I even put the src texture in system memory and the dest texture in the MANAGEDPOOL (VidMem), and made sure the texture formats are the same, with no luck. And of course there are no SDK samples using UpdateTexture().. 1) Is there another function I can use? 2) Can you use CopyRects() using a modifier/cast? Textures and surfaces are the same except for a certain flag right? 3) Can you lock the textures and use memcpy to ''blit''? Though I read you cannot lock vidmem textures. Demo Download: www.angelfire.com/realm/zeroone

  Downloads:  ZeroOne Realm

Advertisement
IDirect3DTexture8::GetSurfaceLevel(..) should match your needs...
All righty then, so a texture is basically a container for surfaces, thanks ''Anonymous Poster'', it compiles ok now an i''ll try it later when I get to my GeForce card.

Too bad Micro$oft didnt mention that in the SDK

Demo Download: www.angelfire.com/realm/zeroone

  Downloads:  ZeroOne Realm

This topic is closed to new replies.

Advertisement