Sign in to follow this  
Axiverse

Locking a texture

Recommended Posts

Axiverse    366
I'm trying to lock a texture, but it fails unless the texture is dynamic. Why can't it be like vertex buffers and allow one lock? Or is this some other error?

Share this post


Link to post
Share on other sites
sirob    1181
Quote:
From DX SDK:
Textures created with D3DPOOL_DEFAULT are not lockable. Textures created in video memory are lockable when created with USAGE_DYNAMIC.

It's intentional.

You can use UpdateSurface or the D3DXLoadSurfaceFrom* methods instead, or use Managed Pool resources, which is usually a good idea anyways.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this