Advertisement Jump to content
Sign in to follow this  
bueyuekt

problem locking mipmap levels for writing

This topic is 4978 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

Hello... I am sitting here for a long time to success in locking mipmap surfaces. I create a Texture with several mipmap levels (CreateTexture). When i try to lock a special mipmap level with LockRect, i get an error and it is not working. It only works for mipmap level 0 here is code: D3DLOCKED_RECT LockedRect; m_Direct3DDevice->CreateTexture( m_Width, m_Height, 0, m_Usage, m_PixelFormat, D3DPOOL_DEFAULT, &m_Texture, NULL); m_Texture->GetSurfaceLevel( 1, &DestSurface ); DestSurface->LockRect(&LockedRect, NULL, D3DLOCK_DISCARD); LockRect creates error code: D3DERR_INVALIDCALL Earlier mentioned, for mipmap level 0 it is working. Can somebody help?? thx

Share this post


Link to post
Share on other sites
Advertisement
You cannot lock it if it is assigned to D3DPOOL_DEFAULT as that memory is not locakable - hope that makes sense my English is flakey tonight :)

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!