Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


#ActualBuckeye

Posted 21 February 2014 - 09:54 PM

Actually, andur's suggestion will probably work better for you. Just create a child window of the main window. You can resize and position the child wherever you'd like within the client area. Build the viewport and projection matrix using the child's client size and aspect ratio. In the render routine:

RECT cRect;
GetClientRect(hChildWindow,&cRect);

... do your rendering

device->Present( &cRect, &cRect, hChildWindow, 0 ); // assumes viewport set to child client size

#1Buckeye

Posted 21 February 2014 - 09:53 PM

Actually, andur's suggestion will probably work better for you. Just create a child window of the main window. You can resize and position the child wherever you'd like within the client area. Build the viewport and projection matrix using the child's client size and aspect ratio. In the render routine:

RECT cRect;
GetClientRect(hChildWindow,&cRect);

... do your rendering

device->Present( &cRect, &cRect, hChildWindow, 0 );

PARTNERS