multiple views in a windows application form

Last post 04-29-2008, 12:26 PM by Shawn Hargreaves. 4 replies.
Sort Posts: Previous Next
  •  04-27-2008, 8:28 PM

    multiple views in a windows application form

    Is possible to insert in a windows application form one or many "squares" showing different camera views to an object?

    Something like 3ds max gui, through a windows form.

    thanks

  •  04-28-2008, 1:59 AM

    Re: multiple views in a windows application form

    I think using viewports would work for that. You could create 1-4 viewports and just have a different camera render the different viewports, etc.

    -----------------------------------------------
    Jim Welch
  •  04-28-2008, 7:29 PM

    Re: multiple views in a windows application form

    the viewports are a good hint

    but how can I link a viewport to the windows form?

    I tried to create a picture box in the form, this is a thing Ive done once using openscenegraph, but  I do not succeed to link the viewport to the picturebox object

    any Idea???

  •  04-28-2008, 7:48 PM

    Re: multiple views in a windows application form

    You can look at the WinForms sample source code. I'm pretty sure that if you can set the GraphicsDevice to the container's handle, then you can just use viewports just like you would in a non-WinForms app.

    -----------------------------------------------
    Jim Welch
  •  04-29-2008, 12:26 PM

    Re: multiple views in a windows application form

    Our WinForms sample does exactly this. It uses a splitter control to separate two controls, both of which render using a shared XNA Framework graphics device. In our sample one of the controls uses SpriteBatch to draw some text, while the other displays a spinning triangle, but you could use the same approach to have each control draw the same object but with a different camera matrix.

    --
    XNA Framework Developer
    blog - homepage
View as RSS news feed in XML
©2007 Microsoft Corporation. All rights reserved. Privacy Statement Terms of Use Code of Conduct Feedback