Unable to lock texture (d3dx9)

Started by
1 comment, last by limpacp 17 years, 5 months ago
Hi. I have a very strange problem. I've never get in this situation as only now. So, my app is d3dx9, device is created with CreateDeviceEx (hardware vertex processing, 800x600, 1 backbuffer and windowed). There is no problem. Backbuffer format is X8R8G8B8. When i'm creating texture with CreateTexture(256,256,1,0,D3DFMT_A8R8G8B8, D3DPOOL_MANAGED, &pTexture,NULL). And failed with error: INVALID CALL. If i'm replacing D3DPOOL_MANAGED to D3DPOOL_DEFAULT, it's ok but failed when i'm doing pTexture->LockRect(0, &rcRect, NULL, 0); I've never get this error in previos directx 8. So, i found a way to lock - using D3DPOOL_SYSTEMMEM. But then failed DrawPrimitive with E_FAIL and exception (long memory call or smt.). I don't have any ideas what can be wrong, so please, help. Thanks!
Advertisement
You probably want the usage flag DYNAMIC.
Oh, it helps.

Thanks!

This topic is closed to new replies.

Advertisement