Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Avalon

Vista - wpf and directx

 
 
Old 07-02-2007   #1 (permalink)
black_13


 
 

wpf and directx

Can WPFand DirectX be combined or does that question even make sense?
I am wanting make 2d games that use wpf but have the power of
directdraw.
thanks
black_13


My System SpecsSystem Spec
Old 07-02-2007   #2 (permalink)
Laurent Bugnion, MVP


 
 

Re: wpf and directx

Hi,

black_13 wrote:
> Can WPFand DirectX be combined or does that question even make sense?
> I am wanting make 2d games that use wpf but have the power of
> directdraw.
> thanks
> black_13


WPF uses DirectX to draw the graphics on the screen, not GDI. So when
you program WPF, you actually program against DirectX. That said, WPF is
often described as too high level for games.

HTH,
Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering, Blog: http://www.galasoft.ch
PhotoAlbum: http://www.galasoft.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
My System SpecsSystem Spec
Old 07-04-2007   #3 (permalink)
Lloyd Dupont


 
 

Re: wpf and directx

Is it possible to have a DirectXCanvas (a bit like the WindowsFormHost) or
something similar in a WPF app?

--
Regards,
Lloyd Dupont
NovaMind Software
Mind Mapping at its best
www.nova-mind.com
"Laurent Bugnion, MVP" <galasoft-lb@bluewin.ch> wrote in message
news:u2Y37WSvHHA.784@TK2MSFTNGP05.phx.gbl...
> Hi,
>
> black_13 wrote:
>> Can WPFand DirectX be combined or does that question even make sense?
>> I am wanting make 2d games that use wpf but have the power of
>> directdraw.
>> thanks
>> black_13

>
> WPF uses DirectX to draw the graphics on the screen, not GDI. So when you
> program WPF, you actually program against DirectX. That said, WPF is often
> described as too high level for games.
>
> HTH,
> Laurent
> --
> Laurent Bugnion [MVP ASP.NET]
> Software engineering, Blog: http://www.galasoft.ch
> PhotoAlbum: http://www.galasoft.ch/pictures
> Support children in Calcutta: http://www.calcutta-espoir.ch


My System SpecsSystem Spec
Old 07-04-2007   #4 (permalink)
Laurent Bugnion, MVP


 
 

Re: wpf and directx

Hi,

Lloyd Dupont wrote:
> Is it possible to have a DirectXCanvas (a bit like the WindowsFormHost)
> or something similar in a WPF app?


Please don't top post. It cuts the whole text under your signature when
I reply to you, and I hate to copy-paste :-)

I never heard of a DirectXCanvas or something similar. That said, I am
far from omniscient, especially not in WPF :-) Maybe you'll find
something online allowing you to have more control over the DirectX drivers.

You can add a HWND to your WPF application (WindowsFormHost is one of
the possible implementations, but you can also implement something for
other type of GDI apps). That said, that is GDI and not DirectX so
probably not what you're looking for.

Sorry I can't be more helpful,
Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering, Blog: http://www.galasoft.ch
PhotoAlbum: http://www.galasoft.ch/pictures
Support children in Calcutta: http://www.calcutta-espoir.ch
My System SpecsSystem Spec
Old 07-04-2007   #5 (permalink)
Lloyd Dupont


 
 

Re: wpf and directx

> I never heard of a DirectXCanvas or something similar. That said, I am far
> from omniscient, especially not in WPF :-) Maybe you'll find something
> online allowing you to have more control over the DirectX drivers.
>
> Sorry I can't be more helpful,

Well, no worries, it's just something I think I might use in some distant
future if I start to seriously look into my idea #37....

My System SpecsSystem Spec
Old 07-07-2007   #6 (permalink)
peter.antal@gmail.com


 
 

Re: wpf and directx

On Jul 4, 6:03 pm, "Lloyd Dupont" <net.galador@ld> wrote:
> > I never heard of a DirectXCanvas or something similar. That said, I am far
> > from omniscient, especially not in WPF :-) Maybe you'll find something
> > online allowing you to have more control over the DirectX drivers.

>
> > Sorry I can't be more helpful,

>
> Well, no worries, it's just something I think I might use in some distant
> future if I start to seriously look into my idea #37....


What is the game scenario you are looking at? That might be a better
way to assess options.


WPF can be indeed be used in interop with DirectX and other Hwnd
oriented technologies. I would recommend becoming acquainted with the
WPF notion of airspace and window regions:
http://msdn2.microsoft.com/En-US/library/aa970688.aspx

A sample using WPF slider based databinding to a directX region is
available here:
http://blogs.msdn.com/pantal/archive...d-interop.aspx

Peter

My System SpecsSystem Spec
Old 07-07-2007   #7 (permalink)
Lloyd Dupont


 
 

Re: wpf and directx

> What is the game scenario you are looking at? That might be a better
> way to assess options.
>


I was thinking to make a "world designer" for my pet RPG (one day,
eventually...)
I though thatof having standart "business interface" in WPF (with list box
and such), but one othe window could present various graphic designer
surface, such as a "World Designer" / "Dungeon Designer" where you would
have a DirectX representation of whatever is designed.

> WPF can be indeed be used in interop with DirectX and other Hwnd
> oriented technologies. I would recommend becoming acquainted with the
> WPF notion of airspace and window regions:
> http://msdn2.microsoft.com/En-US/library/aa970688.aspx
>

Yeah, I though that HwndHost might be good enough for my purpose.


> A sample using WPF slider based databinding to a directX region is
> available here:
> http://blogs.msdn.com/pantal/archive...d-interop.aspx
>

hey, thanks for the link, nice!


Other than that, on my DirectX surface I will probably want to have
tools/control or maybe a simple transparent property viewer (to look at a
creature/structure statistics for instance).

Would be nice to write it in WPF on the the view, ha, well, I guess that's
already not too bad... :-D


My System SpecsSystem Spec
Old 07-07-2007   #8 (permalink)
Lloyd Dupont


 
 

Re: wpf and directx

> A sample using WPF slider based databinding to a directX region is
> available here:
> http://blogs.msdn.com/pantal/archive...d-interop.aspx
>

reading the post, making a picture of my WPF control which I will render in
the foreground is a good idea....


My System SpecsSystem Spec
 

Thread Tools


Similar Threads
Thread Forum
Can your play DirectX 9c games with DirectX 10? General Discussion
Hello and directx General Discussion
DirectX 10 Vista Games
DirectX 10 Vista Games
Question - Is DirectX 8.1 H/W + DirectX 9.0 S/W enough? Vista hardware & devices


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46