Problem updating vertex textures (lock/unlock)

Started by
1 comment, last by errantkid 15 years, 1 month ago
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
pD3DTexture->LockRect(uMipLevel, &LockedRect, NULL, D3DLOCK_NO_DIRTY_UPDATE);
pD3DTexture->UnlockRect(uMipLevel);
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.
Advertisement
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.
Ah! I figured out...
Thanks evil, it did indeed have to do with the dirty rect. Unfortunately the problem was between the chair and the keyboard originating from a silly misunderstanding of our engine's API. Thank you for the help!

This topic is closed to new replies.

Advertisement