Jump to content
  • Advertisement
Sign in to follow this  

ResizeBuffer Not Working !

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

hi ;

i have this function to resize my Application

RECT Rect ;
ZeroMemory(&Rect , sizeof(RECT));
::GetWindowRect ( _hwnd , &Rect);

UINT tempwidth = Rect.right - Rect.left ;
UINT tempheight = Rect.bottom - Rect.top ;


if ( SUCCEEDED ( _SwapChain->ResizeBuffers ( _Swp_Chain_desc.BufferCount, tempwidth , tempheight , _Device_Format , 0 )))

if ( SUCCEEDED (_SwapChain->GetBuffer (0 , __uuidof(ID3D11Texture2D) , reinterpret_cast <void**>(&_Target_Tex2D))))

if ( FAILED( _Device->CreateRenderTargetView ( _Target_Tex2D , 0 , &_Target)))

and i call this function when i get WM_SIZE message in the loop game.

and whene i resize my window i get everything black and it is my render target color

but if i dont resize my window i get the scene correctly that is a HUD and meshes

ok guys you have the code

is it the probleme in the code or another else.

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!