473,713 Members | 2,494 Online
Bytes | Software Development & Data Engineering Community
+ 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.Direc tX.AudioVideoPl ayback; //not in standard VS2008
library, must download from MSFT
public class MyVideoPlayer : System.Windows. Forms.Form
{
Aug 25 '08 #1
11 3463
On Aug 25, 9:49 am, raylopez99 <raylope...@yah oo.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.Direc tX.AudioVideoPl ayback; //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...@yah oo.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...@g mail.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.c omwrote:
On Aug 26, 12:23 am, JDeats <Jeremy.De...@g mail.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**********@g mail.comwrote in message
news:24******** *************** ***********@n38 g2000prl.google groups.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

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

Similar topics

7
36820
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 23:24:44: dsetup32: === SetupForDirectX() start === 09/10/05 23:24:44: dsetup32: DXSetupCommand = 0. 09/10/05 23:24:44: DXSetup: DSetupCallback(): Phase = 0, Steps = 0 09/10/05 23:24:44: dsetup32: DirectXSetupIsJapanese == 0 09/10/05 23:24:44: dsetup32:...
6
7139
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 2002. Don't know if there's an incompatibility issue. Thanks.
1
1456
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) 3D-applications in the shortest possible time in .net. It involves implementing things like a node structure for the scenegraph, a console, device configuration manager etc. Just like we know it from other APIs, like java3d or openinventor or from...
4
9100
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 namespace name 'DirectX' does not exist in the class or namespace 'Microsoft' (are you missing an assembly reference?) Im not sure why it says this because I have DirectX 9.0 installed ??
9
7482
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 XP Pro PC and I then installed the full DirectX 9.0 SDK (Summer 2004) & then the latest DirectX 9.0 SDK (Feb 2005) Spent several hours doing all this but there are NO DirectX C# sample
0
2941
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 XP Home), a Dell Xeon workstation (Windows XP Pro) and a Gateway GM 825 (Windows XP Media Center). It also runs on the Dell and the Compaq under VS 2005, but when I attempt to run the code under VS 2005 on the Gateway (Windows XP MCE), I get...
1
2698
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 DirectX – i.e. I would like to get an overlay surface from c# and write my frame to the surface then render it. From what I’ve now found out, this isn’t an easy task. It sounded simple enough but after looking at DirectX 9, only later to...
14
2653
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
2705
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 hearing that DirectShow may have the answer. However, after downloading the latest DirectX SDK it says that DirectShow is now obsolete but it doesn't say what I should be using. I am thinking that I need to set up some tcp network streaming to...
0
8795
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
8701
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9306
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9068
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9009
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7942
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6621
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 presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4715
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2103
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.