pD3DTexture->LockRect(uMipLevel, &LockedRect, NULL, D3DLOCK_NO_DIRTY_UPDATE);
pD3DTexture->UnlockRect(uMipLevel);
Problem updating vertex textures (lock/unlock)
I've got a vertex texture that I'm trying to update from the cpu.
I create the texture
Texture pool: D3DPOOL_MANAGED
Texture format: D3DFMT_R32F
No mipmaps
Then for updating the texture it's a (relatively) simple case of
The vertex shader is a regular HLSL vs_3_0 .fx shader
This all works fine until I've created the shader and started rendering at which point updating the texture no longer has any effect. Am I missing some flag? I've been looking everywhere to try and find an answer.
You do lock at least once without the D3DLOCK_NO_DIRTY_UPDATE flag, right? Using that flag means "I don't want you to mark this texture as needing uploaded to the GPU" (More or less) - so if you lock with that flag, the texture won't be getting marked as dirty, so won't be getting uploaded to the GPU, so won't be getting changed.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement