See inline
Willy.
"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:eG****************@TK2MSFTNGP15.phx.gbl...
| Hi Willy,
|
| > 1. You aren't supposed to program against DirectX on Vista (at least not
| > in
| > managed code, which is what this NG is about, right?), you are gonna use
| > WinFX and the WPF framework classes which are a managed layer on top of
| > DirectX on XP or on top of a new graphics engine WGF, costing of
| > Direct3D10
| > and the new hardware accelerated Graphics drivers on Vista.
| > Watch this...
| >
http://windowssdk.msdn.microsoft.com...1b26f7d901.asp
|
| First of all, the documentation you referred to was about a very limited
set
| of UI graphics, not all graphics, which includes 3D drawing. That
particular
| reference was to UI Controls only. In other words, there is a very limited
| set of (UI only) drawing you can do with this particular set of tools,
which
| is UI-specific. To give you an example from the current platform, you can
| create a form and you can override the Paint event to draw in 2 Dimensions
| on a Control. However, you cannot draw a 3D game interface on a Control
| using GDI+ or System.Drawing.Graphics. For that, you have to use DirectX.
|
Sorry, but you should read the OP's question first.
<snip
I am writing an application in C# which need to plot graphs and simple
shapes (polygons, circles, squares etc). Which library is better for this
purpose and why? Thanks.
/snip>
See, the question is about simple shapes, you don't need DirectX for this
point.
Then you suggested to use DirectX because it would be part of WPF on Vista,
And I say you don't need to go down that level to draw simple or even
complex shapes on Vista, just use the WPF classes they wrap 2D/3D complex
drawing using the WPF engine (called the Desktop Window Manager (DWM), which
uses only uses DirectX for rendering).
| These UI classes run on top of DirectX.
No, they are drawing classes in the System.Windows.Media and the
System.Windows.Media.Media3D namespaces, they run on top of DWM, they are
extremely powerfull/functional.
Please don't confuse WPF drawing/rendering with DirectX, both serve
different purposes, they run in different airspaces (just like native
Win32/GDI), both share the same DirectX rendering engine and the VDDM (Vista
Display Driver Model), while Win32/GDI uses the GDI rendering engine like on
all other Windows platforms.
They are not DirectX, but you can
| certainly draw using DirectX "directly." And, if you recall from my
original
| reply, I recommended DirectX *over OpenGL*, since in Vista, OpenGL is
likely
| to sit on top of DirectX as well, and therefore, not perform quite as
well.
| That I can't be sure of, but that is how I'd bet.
|
| As for DirectX being managed, I've been working with Managed Direct3D for
| almost 2 years now. No, the most current release of the DirectX SDK does
not
| contain a Managed DirectX library for Windows Vista. But it's coming, and
| when Vista is released, it will be here.
|
It does, it's called DirectX3D10! But you need Vista class driver and
hardware accelerated GPU's (actually, some limitted support ) to use them.
And I use them since a couple of months since I'm on the beta team for
Vista.
| > 2.XAML is a new XML-based declarative programming language with the
| > potential to create UI without the need for code, and the potential of
| > drawing 2D shapes without code, which was the OP's request. <snip from
the
| > URL you posted...
| > XAML enables you to create a UI without using code. You can create quite
| > elaborate documents or pages entirely in markup using controls, text,
| > images, shapes and so forth.
|
| Again, you're talking about UI only. If you limit yourself to a discussion
| of what to use to draw UI, you eliminate both DirectX and OpenGL from the
| conversation, regardless of whether you're discussing the current or next
| version of Windows.
No, I don't eliminate DirectX from the discussion, I just said you don't
need it to draw simple/shapes shapes and graphs on the current platform, and
certainly not on Vista, I don't want to push the OP towards something he/she
doesn't need.
And again, I was answering the question which is the
| title of this thread "directx or opengl." I was specifically addressing
this
| question, not the question of whether either of the 2 technologies was the
| best choice for doing simple graphics. This is exactly what I said: "For
the
| purpose of planning ahead, I would use DirectX, *if it was a choice
between
| the 2*." Obviously, neither is necessary for simple graphics. And UI-level
| classes will suffice for that purpose.
|
| > 3.
| > | You don't write graphics programming code with it. See ..
| >
http://windowssdk.msdn.microsoft.com...asp?frame=true.
| >
| > This page refers to the "unmanaged DirectX" interfaces available on
Vista.
| > This is the API used by applications written in 'native' C++ code, are
| > Vista
| > only API's and must run on hardware that implements the Windows Vista
WDDM
| > (new driver model for hardware accelerated Graphical devices).
|
| *I* do 3D graphics programming with Managed Direct3D. And I have every
| expectation that it will be available on Windows Vista, regardless of the
| fact that it hasn't been pre-released for it yet. Updates for managed
| DirectX come out every couple of months. And it's not going away.
|
See above native Direct3D10 is in the latest SDK (beta), but no (publicly
available) managed framework exists for it (yet).
| --
| HTH,
|
| Kevin Spencer
| Microsoft MVP
| .Net Developer
| We got a sick zebra a hat,
| you ultimate tuna.
|
|
| "Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in message
| news:%2****************@TK2MSFTNGP11.phx.gbl...
| > 1. You aren't supposed to program against DirectX on Vista (at least not
| > in
| > managed code, which is what this NG is about, right?), you are gonna use
| > WinFX and the WPF framework classes which are a managed layer on top of
| > DirectX on XP or on top of a new graphics engine WGF, costing of
| > Direct3D10
| > and the new hardware accelerated Graphics drivers on Vista.
| > Watch this...
| >
http://windowssdk.msdn.microsoft.com...1b26f7d901.asp
| >
| > 2.XAML is a new XML-based declarative programming language with the
| > potential to create UI without the need for code, and the potential of
| > drawing 2D shapes without code, which was the OP's request. <snip from
the
| > URL you posted...
| > XAML enables you to create a UI without using code. You can create quite
| > elaborate documents or pages entirely in markup using controls, text,
| > images, shapes and so forth.
| > /snip>
| >
| > 3.
| > | You don't write graphics programming code with it. See ..
| >
http://windowssdk.msdn.microsoft.com...asp?frame=true.
| >
| > This page refers to the "unmanaged DirectX" interfaces available on
Vista.
| > This is the API used by applications written in 'native' C++ code, are
| > Vista
| > only API's and must run on hardware that implements the Windows Vista
WDDM
| > (new driver model for hardware accelerated Graphical devices).
| >
| > and ....
| > | And WMP is an acronym for "Windows Media Player," which has nothing to
| > do
| > | this topic.
| >
| > was a typo, sorry.
| >
| > Willy.
| >
| >
| >
| > "Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
| > news:%2****************@TK2MSFTNGP15.phx.gbl...
| > |> You are gonna use the WMP classes and/or XAML for this do you,
DirectX
| > is
| > | > not the API to use from WPF.
| > |
| > | First of all, XAML is a presentation language. See
| > |
| >
http://windowssdk.msdn.microsoft.com...40017c22e4.asp
| > |
| > | You don't write graphics programming code with it. See
| > |
| >
http://windowssdk.msdn.microsoft.com...asp?frame=true.
| > |
| > | Direct3D is the graphics "layer" for Windows Vista. See
| > |
http://msdn.microsoft.com/windowsvista/experience/
| > |
| > | To quote:
| > |
| > | "A new graphics driver model has been introduced with Windows Vista
that
| > is
| > | stable and secure; it has built-in fault tolerance to enable constant
| > use
| > of
| > | the graphics processor unit (GPU) for the rich graphics sported by the
| > | operating system and the applications. The GPU memory manager and
| > scheduler
| > | in this driver model enable multiple graphics applications to use the
| > GPU
| > to
| > | run simultaneously.
| > | Windows Graphics Foundation 2.0 (WGF), also known as Direct3D10, sits
on
| > top
| > | of, but is distinct from, the new driver model. Applications can use
| > this
| > | application programming interface (API) for compelling next-generation
| > | cinematographic visuals as well as taking advantage of the massive
| > | computational horsepower available on the GPU for more general purpose
| > | applications that are easily parallelized (termed GPGPU). An example
of
| > such
| > | use is image processing."
| > |
| > |
| > | And WMP is an acronym for "Windows Media Player," which has nothing to
| > do
| > | this topic.
| > |
| > | --
| > | HTH,
| > |
| > | Kevin Spencer
| > | Microsoft MVP
| > | .Net Developer
| > | We got a sick zebra a hat,
| > | you ultimate tuna.
| > |
| > |
| > |
| > | "Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in message
| > | news:%2****************@TK2MSFTNGP12.phx.gbl...
| > | > You are gonna use the WMP classes and/or XAML for this do you,
DirectX
| > is
| > | > not the API to use from WPF.
| > | >
| > | > Willy.
| > | >
| > | >
| > | >
| > | > "Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
| > | > news:eQ**************@TK2MSFTNGP09.phx.gbl...
| > | > | For the purpose of planning ahead, I would use DirectX, if it was
a
| > | > choice
| > | > | between the 2. DirectX is going to be part of the foundation of
| > Windows
| > | > | Presentation Services in Windows Vista.
| > | > |
| > | > | --
| > | > | HTH,
| > | > |
| > | > | Kevin Spencer
| > | > | Microsoft MVP
| > | > | .Net Developer
| > | > | We got a sick zebra a hat,
| > | > | you ultimate tuna.
| > | > |
| > | > |
| > | > | "Willy Denoyette [MVP]" <wi*************@telenet.be> wrote in
| > message
| > | > | news:ec*************@TK2MSFTNGP15.phx.gbl...
| > | > | >
| > | > | > "Jessica Weiner" <je*****@gmail.com> wrote in message
| > | > | > news:VC*******************@newssvr29.news.prodigy. net...
| > | > | > |I am writing an application in C# which need to plot graphs and
| > | > simple
| > | > | > | shapes (polygons, circles, squares etc). Which library is
better
| > for
| > | > | > this
| > | > | > | purpose and why? Thanks.
| > | > | > |
| > | > | > |
| > | > | >
| > | > | > System.Drawing and System.Drawing.Drawing2D do contain the
classes
| > | > that
| > | > | > wrap
| > | > | > GDI++ and are in general all you need to draw simple shapes.
| > | > | >
| > | > | >
| > | > | > Willy.
| > | > | >
| > | > | >
| > | > |
| > | > |
| > | >
| > | >
| > |
| > |
| >
| >
|
|