🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Direct3d11 Set the render target to portion of window.

Started by
3 comments, last by hplus0603 2 years, 9 months ago

I tried to set the viewport from 0 to width/2 and 0 to height/2 to be on half of the window, however I can't add text to the rest of the window.

Advertisement

Sorry but I don't think I understand the problem here. You set a viewport that only targets the upper-left corner of the window and that works fine, but you also want to draw text to the other portions of the window? Why not just set the viewport again before drawing your text?

I want to add for example a text input box which is not part of the viewport. It is not UI. The window I'm using to render the viewport is Visual C++ Windows forms form. I want to add a textbox outside of viewport.

It's been a while, but if I remember correctly, what you should do is make sure your D3D11 target window is a child window of the top level window, and then make the text input box be another child window of the top level window.
As long as the D3D renderer targets the designated target child window, there will be no overdraw/overlap.

enum Bool { True, False, FileNotFound };

This topic is closed to new replies.

Advertisement