See inline
Willy.
[quoted text, click to view] "Kevin Spencer" <kevin@DIESPAMMERSDIEtakempis.com> wrote in message
news:eGDRq%23MMGHA.4052@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/library/default.asp?url=/library/en-us/wcp_conceptual/html/66d7a6d6-e3b6-47bc-8dfe-8a1b26f7d901.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/library/en-us/directx9_c/dx9LH.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.
|
|
[quoted text, click to view] | "Willy Denoyette [MVP]" <willy.denoyette@telenet.be> wrote in message
| news:%23AagOFMMGHA.1832@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/library/default.asp?url=/library/en-us/wcp_conceptual/html/66d7a6d6-e3b6-47bc-8dfe-8a1b26f7d901.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