Jump to content
  • Advertisement
Sign in to follow this  
errantkid

Problem updating vertex textures (lock/unlock)

This topic is 3416 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!