Xbox LIVE Indie Games
Sort Discussions: Previous Discussion Next Discussion
Page 1 of 1 (1 posts)

Rendering Direct3D11 into a win32 child window

Last post 1/1/2018 6:09 AM by jfwfreo. 0 replies.
  • 1/1/2018 6:09 AM

    Rendering Direct3D11 into a win32 child window

    I am writing a level editor using Visual C++ and the win32 API. I have the game engine going working fine with Direct3D 11 (its not an off-the-shelf engine, its custom)

    The plan for the editor is to have something like this:
    https://drive.google.com/file/d/1mLUy0ybk7sQP6ltMzimESKntub5zLLg4/view
    The blue bit is going to be a standard win32 menu bar, the yellow bit will be a standard win32 status bar, the red bit will contain things like a list of objects to insert into the level (its contents will change depending on what the user is doing) and the purple bit will be a window that will be rendered into by the rendering code. I know how to do Direct3D11 rendering into a window that is the parent window and is the only thing the app is drawing (the engine runs a loop that lets the windows message loop run and process its messages before running the engine code and doing rendering) but I can't find anything out there on how you do Direct3D graphics (11 or otherwise) into a child window and how you handle things like resizing and painting and things. Its definitely possible since so many level editors and things do it but I dont know how they pull it off. (and Google isn't showing anything useful either)

    Are there any examples out there of how you can create a win32 custom control/child window, set up a IDirect3D11Device to draw onto that window and then have that window play nice with all the other windows (the main parent window and the other child windows) whilst still triggering a once-per-frame render call to allow me to draw my stuff in there.
Page 1 of 1 (1 posts) Previous Discussion Next Discussion