Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Avalon

wpf and directx

Closed Thread
 
Thread Tools Display Modes
Old 07-02-2007   #1 (permalink)
black_13
Guest


 

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

Old 07-02-2007   #2 (permalink)
Laurent Bugnion, MVP
Guest


 

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
Old 07-04-2007   #3 (permalink)
Lloyd Dupont
Guest


 

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


Old 07-04-2007   #4 (permalink)
Laurent Bugnion, MVP
Guest


 

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
Old 07-04-2007   #5 (permalink)
Lloyd Dupont
Guest


 

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....

Old 07-07-2007   #6 (permalink)
peter.antal@gmail.com
Guest


 

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

Old 07-07-2007   #7 (permalink)
Lloyd Dupont
Guest


 

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


Old 07-07-2007   #8 (permalink)
Lloyd Dupont
Guest


 

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....


Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Where is my directx 10 ? sahitanand Graphic cards 5 12-26-2007 11:25 PM
directx chad Vista hardware & devices 0 11-16-2007 12:47 AM
DirectX 10 Dick Palmer Vista Games 7 02-05-2007 05:06 AM
DirectX Doug Vista hardware & devices 1 11-24-2006 02:17 AM
Question - Is DirectX 8.1 H/W + DirectX 9.0 S/W enough? Pete Vista hardware & devices 2 06-24-2006 12:58 PM








Vistax64.com 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 2005-2008

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 47 48 49 50