473,471 Members | 1,900 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Is DirectX obsolete?

I just downloaded the apparently free SDK for DirectX 9, all 200+ MB
of it, but as I read about WPF I wonder: is DirectX obsolete? Should
I even bother learning how to use it? After all, the end user must
have the DirectX library installed on their PC before they can use any
video playing program you write.

Does WPF even use DirectX? Or are the functions of DirectX (mostly
video and graphics stuff, possibly accelerated via software or
hardware) already 'built into' WPF/Vista?

I would like to know before I install the SDK.

Thanks,

RL

Playing a Video File

To play a video file, start by creating an instance of the Video
class. You can specify the file name in the Video constructor as in
the following C# code example, or else call the Open method with the
file name.
[C#]
using Microsoft.DirectX.AudioVideoPlayback; //not in standard VS2008
library, must download from MSFT
public class MyVideoPlayer : System.Windows.Forms.Form
{
Aug 25 '08 #1
11 3431
On Aug 25, 9:49 am, raylopez99 <raylope...@yahoo.comwrote:
I just downloaded the apparently free SDK for DirectX 9, all 200+ MB
of it, but as I read about WPF I wonder: is DirectX obsolete? Should
I even bother learning how to use it? After all, the end user must
have the DirectX library installed on their PC before they can use any
video playing program you write.

Does WPF even use DirectX? Or are the functions of DirectX (mostly
video and graphics stuff, possibly accelerated via software or
hardware) already 'built into' WPF/Vista?

I would like to know before I install the SDK.

Thanks,

RL

Playing a Video File

To play a video file, start by creating an instance of the Video
class. You can specify the file name in the Video constructor as in
the following C# code example, or else call the Open method with the
file name.
[C#]
using Microsoft.DirectX.AudioVideoPlayback; //not in standard VS2008
library, must download from MSFT
public class MyVideoPlayer : System.Windows.Forms.Form
{
Absolutely not, although some applications that would have required
DirectX before can now be implemented using WPF with much less code.
They exist at different levels in the API stack. WPF (Windows
Presentation Foundation) is under the .NET 3.0 umbrella of
technologies, In the most simple (and most inpolitically correct)
terms you can think of WPF as an XML based markup language for
developing Adobe Flash like creations for Windows, that is it's a
vector based engine that you develop for using an XML markup language
(XAML). The web subset of WPF is Silverlight and it shares the same
markup language as desktop WPF (creating unification in UI
development) albeit with a reduced set of features.

WPF actually uses Direct3D surfaces for its rendering. Relative to
WPF, DirectX is a low-level API which is platform specific and tuned
for high performance graphics applications (namely games). DirectX 11
has been announced and is on it's way and Microsoft has said it will
be a core API for Windows Vista's successor "Windows 7". So DirectX
isn't going anywhere (yet) and if you want to write a high performance
3D application DirectX or OpenGL are really your only two options.




Aug 25 '08 #2

IMO they are different technologies and will coexist for a long time.
DirectX is the tool used for the majority of games in the windows
platform.
>
Does WPF even use DirectX? *Or are the functions of DirectX (mostly
video and graphics stuff, possibly accelerated via software or
hardware) already 'built into' WPF/Vista?
I do not know really, but I would bet that WPF uses DirectX. It has
no sense to create another graphic library
What you want to do though?
Aug 25 '08 #3
raylopez99 wrote:
I just downloaded the apparently free SDK for DirectX 9, all 200+ MB
of it, but as I read about WPF I wonder: is DirectX obsolete? Should
I even bother learning how to use it? After all, the end user must
have the DirectX library installed on their PC before they can use any
video playing program you write.
DirectX 9 is included in Vista, and is so old that practially everybody
will have it installed on XP. Unfortunately, DirectX can be partially
installed and some systems don't have the managed bits.
Does WPF even use DirectX? Or are the functions of DirectX (mostly
video and graphics stuff, possibly accelerated via software or
hardware) already 'built into' WPF/Vista?
WPF uses Direct3D (the graphics bit of DirectX).

Managed DirectX is nice, but dead - Microsoft killed the development of
Managed DirectX 2 and encourages the use of XNA. I can't really comment
on XNA as I've not used it.

WPF gives you a nice abstraction over the Direct3D standard pipeline
(well... ish) with its 3D stuff. Performance is pretty good, and you can
write your own pixel shaders in .NET 3.5 SP1 (very recently released).
You can't write your own vertex shaders through. I also don't see a way
to manually manage which pool each texture are stored in.

In short, you can get better performance from Direct3D because you can
use vertex shaders and you can manually optimise what data needs to be
sent over the graphics bus (which can easily be the bottleneck in a 3D
application).
The disadvantages of Direct3D are *serious* though:
1) In Direct3D, you do a load of work and then call Device.Present(). If
you've done something wrong at any point, the only exception that is
ever thrown is DirectXExcption with a message: "Error in application",
and it will pretty much always be thrown when you call Present().
Debugging is a nightmare.
2) Direct3D is very low level. Drawing a triangle on the screen in a
robust way that won't crash when odd things happen takes hundreds of
lines of code.
3) You have to manually manage the differences between different
graphics cards (different features are avaliable on different graphics
cards).
4) Managed DirectX is no longer being actively developed (and I'm not
sure it's even supported).

Alun Harford
Aug 25 '08 #4
JDeats wrote:
On Aug 25, 9:49 am, raylopez99 <raylope...@yahoo.comwrote:
>I just downloaded the apparently free SDK for DirectX 9, all 200+ MB
of it, but as I read about WPF I wonder: is DirectX obsolete? Should
I even bother learning how to use it? After all, the end user must
have the DirectX library installed on their PC before they can use any
video playing program you write.

Does WPF even use DirectX? Or are the functions of DirectX (mostly
video and graphics stuff, possibly accelerated via software or
hardware) already 'built into' WPF/Vista?

I would like to know before I install the SDK.

Thanks,

RL

Absolutely not, although some applications that would have required
DirectX before can now be implemented using WPF with much less code.
They exist at different levels in the API stack. WPF (Windows
Presentation Foundation) is under the .NET 3.0 umbrella of
technologies, In the most simple (and most inpolitically correct)
terms you can think of WPF as an XML based markup language for
developing Adobe Flash like creations for Windows,
WPF the whole system. Xaml is simply an XML format for specifying the
parts of your application that don't change (similar to the partial
classes that the Winforms designer generates).
that is it's a
vector based engine that you develop for using an XML markup language
(XAML). The web subset of WPF is Silverlight and it shares the same
markup language as desktop WPF (creating unification in UI
development) albeit with a reduced set of features.
Unfortunately, Silverlight is not a subset of WPF.
WPF actually uses Direct3D surfaces for its rendering. Relative to
WPF, DirectX is a low-level API which is platform specific and tuned
for high performance graphics applications (namely games). DirectX 11
has been announced and is on it's way and Microsoft has said it will
be a core API for Windows Vista's successor "Windows 7". So DirectX
isn't going anywhere (yet) and if you want to write a high performance
3D application DirectX or OpenGL are really your only two options.
You can do a lot in WPF without having to go down to raw Direct3D
(particularly with support for pixel shaders in .NET 3.5 SP1). On the
other hand, if you're making an AAA game you have no real choice but
DirectX.

Alun Harford
Aug 25 '08 #5
>
Managed DirectX is nice, but dead - Microsoft killed the development of
Managed DirectX 2 and encourages the use of XNA. I can't really comment
on XNA as I've not used it.
I have developed two small game applications using XNA for hobby. The
XNA API is different from DirectX, vastly simplified and taylored for
game applications, crippled in some aspects. Managed DirectX 10 would
really fill a gap if you wanted to create something such as a 3D
rendering package (mixing WinForms and Direct3D), unless signifigant
changes have been made to XNA, you could not do that six months
ago....

Also XNA was limited to Visual Studio.NET Express editions and C#,
does anyone know if this is still the case.

Unless you're building a game application, I would like into using
OpenGL with C# before going XNA


Aug 25 '08 #6
Looks like quite a bit has changed with XNA
http://msdn.microsoft.com/en-us/library/bb197956.aspx

Aug 25 '08 #7
On Aug 26, 12:23*am, JDeats <Jeremy.De...@gmail.comwrote:
Also XNA was limited to Visual Studio.NET Express editions and C#,
does anyone know if this is still the case.
As I understand, it was (and still is) a limitation only for the free
version of XNA, not for the full-featured commercial one.
Aug 26 '08 #8
On Aug 26, 9:19 am, Pavel Minaev <int...@gmail.comwrote:
On Aug 26, 12:23 am, JDeats <Jeremy.De...@gmail.comwrote:
Also XNA was limited to Visual Studio.NET Express editions and C#,
does anyone know if this is still the case.

As I understand, it was (and still is) a limitation only for the free
version of XNA, not for the full-featured commercial one.
Interesting. Well, the current version is XNA Game Studio 2.0 (there
is no Professional/commerical version). XNA Game Studio 3.0 is
available as technical preview download. But I don't see anywhere in
the documentation where you can use XNA Game Studio with VS.NET 2008
Professional, it still appears to be limited to the free (read:
crippled and limited under license agreement) Express edition of
Visual C#, which would mean there is a gap left where support for
managed code ceased after the DirectX 9 SDK.

If Microsoft removes managed code support from DirectX, provides a
transition path from managed DirectX to XNA and then turns XNA
commerical product they effectively start charging for what was (and
should be) a free API. I'm sure they will bundle some tools with XNA
Game Studio to justify this, but I think it's sad that they are
ceasing to maintain managed DirectX support. Does anyone know of a
good article with someone in the XNA/DirectX team that explains the
reasoning behind this transition? I mean, other than Microsoft finding
another way to turn an otherwise free API into a commerical product.




..
Aug 26 '08 #9

"JDeats" <Je**********@gmail.comwrote in message
news:24**********************************@n38g2000 prl.googlegroups.com...
>
Interesting. Well, the current version is XNA Game Studio 2.0 (there
is no Professional/commerical version). XNA Game Studio 3.0 is
available as technical preview download. But I don't see anywhere in
the documentation where you can use XNA Game Studio with VS.NET 2008
Professional, it still appears to be limited to the free (read:
crippled and limited under license agreement) Express edition of
Visual C#, which would mean there is a gap left where support for
managed code ceased after the DirectX 9 SDK.
XNA 3.0 CTP requires VS2008 Standard Edition or higher (with c# installed),
or c# 2008 Express Edition.

See here...

http://blogs.msdn.com/xna/Default.aspx?p=2

Rob
Aug 27 '08 #10
Alun Harford wrote:

[snip]
You can do a lot in WPF without having to go down to raw Direct3D
(particularly with support for pixel shaders in .NET 3.5 SP1). On the
other hand, if you're making an AAA game you have no real choice but
DirectX.

..... or OpenGL. :)
Aug 27 '08 #11
Todd Carnes wrote:
Alun Harford wrote:

[snip]
>You can do a lot in WPF without having to go down to raw Direct3D
(particularly with support for pixel shaders in .NET 3.5 SP1). On the
other hand, if you're making an AAA game you have no real choice but
DirectX.


..... or OpenGL. :)
Unfortunately, I don't think that's true any more. Driver support is
much better for DirectX; I think this will stifle innovation...

Alun Harford
Aug 28 '08 #12

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: kastillo | last post by:
Im trying to install directx 9.0 c , but i simply cant . When i run the installer it just says " The installed components are ready to use". This is the report on directx.log : 09/10/05...
6
by: ammd | last post by:
Hi, I installed Microsoft DirectX 9.0 SDK (Summer 2004) but when I create a project and try to add the necessary references I can't find them. Does anybody know where to look for them? BTW, I have VS...
1
by: Robert Ludewig | last post by:
Hello, I recently started to develop my own little high level, easy to use 3D API on top of managed directx for .net. The idea behind it is having a generic API that lets me create (simpler)...
4
by: Junaid Hussain | last post by:
Hi, I am thinking about developing a 3D pool game in C# using DirectX, however when I compile a C# at the command prompt using; csc PoolGame.cs , I get the following error message; The type or...
9
by: Mike P | last post by:
Problems, problems... Im trying to create DirectX Projects within C# and to also look at the latest DirectX C# Samples. I have just installed MS Visual C# .net Standard Edition on my Windows...
0
by: Harvey Cohen | last post by:
Hello all, I have some C# code that implements calls to DirectX.DirectSound. It compiles under both VS .NET 2003 and VS 2005 and runs under VS .NET 2003 and VS 2005 on a Compaq laptop (Windows...
1
by: Kav | last post by:
Hello, I apologize in advance for my “Greenness” . I posted a question a couple weeks ago asking how I could render a DIB frame a custom decoder from unmanaged code to a c# window using...
14
by: Jessica Weiner | last post by:
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.
1
by: Jerry Spence1 | last post by:
I'm struggling to get started on this subject as I can find out so little information about DirectX I have some IP Cameras and I am trying to display the video and also save the file, and I am...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.