I was previously uploading textures to DirectX by creating texture in D3DPOOL_MANAGED
and then calling LockRect
to upload the texture data to DirectX. However, I have switched to using DirectX9 Ex, and can no longer use D3DPOOL_MANAGED
, so in order to call LockRect
I have to make the texture use D3DUSAGE_DYNAMIC
. However, I would prefer not to have to use D3DUSAGE_DYNAMIC
. Is my only other option to create a texture in system memory, and then call IDirect3DDevice9::UpdateTexture
to get the texture data into video memory? I also see there is a D3DXFillTexture
function. But what i really want is something equivalent to glTexImage2D
where i can create a texture and pass it raw data.
Note that I have stripped down RGBA texture data, otherwise I would try using DXCreateTextureFromFileInMemory
.