Post Reply  Post Thread 
Future of Managed DirectX in Jade 2.0
Author Message
Reed
Developer
*****


Posts: 314
Group: Developers
Joined: Oct 2006
Status: Offline
Post: #1
Future of Managed DirectX in Jade 2.0

For those of you who don't know, Microsoft just released the August 2007 DirectX SDK.  The release page is at:
http://www.microsoft.com/downloads/detai...laylang=en

Note, near the bottom, this nice, small section:

Quote:
Last Release of the DirectX SDK That Will Contain ....

This is the final release of the DirectX SDK that will contain the following components:
  • Direct3D8 and all of the earlier versions
  • Direct3D RM
  • DirectAnimation
  • DirectMusic
  • DirectInput7 and all of the earlier versions
  • DirectPlay
  • DirectPlayVoice
  • DirectX8-era HRESULT conversion routines
  • Managed DirectX samples and documentation


Microsoft has been very hesitant to say their future plans for Managed DirectX, other than a few employees on some boards mentioning not to expect anything related to this any time soon. They seem to be focused nearly entirely on XNA.

Before I go into this - I do want to say, right up front, XNA doesn't really get us anything in terms of Jade over MDX. Since we're writing a PC engine (we use a lot of non-compact framework things), it would never run on a 360. Also, since we're completely abstracting out the rendering, the end user would never use XNA directly - they'd be using Jade. XNA would just be a slower version of MDX for us.

After some research and some chatting with Vicente, we are thinking that we may want to move away from using the MDX1.1 libraries for rendering. They are now deprecated, with no 2.0 version ever to be released, and no plans for support or development at this time.

The three best options out there, right now, seem to be:

Stick with MDX. So far, MS hasn't said they're going to stop allowing distribution of the end user runtimes, so this is probably pretty safe. However, they have already done similar things to this with other parts of D3D (for example, there's no legal way to get D3DRM.dll onto a vista box, even though it works). For the long term, staying with a deprecated, unsupported tool doesn't seem like a great idea.

Another option: Use SlimDX - A free managed DirectX wrapper (C++/CLI based) being developed as a replacement for MDX. Just to test this, I've started implementing a rendering backend for Jade 2.0 using these libraries. It's in an incomplete state at the moment (so far, only text is rendering correctly - and I'm not sure why), although it does appear to be quite close to MDX, if not a little bit cleaner in terms of syntax. If anybody wants to jump in and help figure out how to fix this, that'd be great. Smile

One nice thing about SlimDX is that the developers have also already started managed DX10 wrappers - so, when it comes time, Jade would have a fairly straightforward path towards developing a DX10 rendering backend.

Also, it does appear to be fairly active and maintained.

There is another potential option - since the rendering system is implemented as a separate assembly, and loaded via a plugin, we could actually implement it in C++/CLI instead of C#. This would entail some of us writing C++ code instead of C# code, but would let us work directly with the MS supported DirectX library code. Also, this removes another abstraction layer in the rendering pipeline, which would most likely boost performance. (Jade->RenderingSystem->D3D vs. Jade->RenderingSystem->MDX->D3D)

Since this isn't the main Jade assembly, and end users would never deal with it directly (other than saying to use it to render), there aren't any downsides from an end user's perspective - they're still just dealing with the main Jade assembly (which is all C#). The downside to this is that the developers working on the renderer need to know C++/CLI. I'd be more than happy to help port things in this directly, but I'm not sure if this is the best approach or not.

Anyways, I wanted to get some discussion going about this. Since we've just started this large rewrite, I think we're better off trying to figure this out now, and working with the tools we're going to want to use in the long term, instead of waiting and trying to resolve this later when/if it becomes a problem.

-Reed

08-01-2007 01:38 AM
Visit this users website Find all posts by this user Quote this message in a reply
Quimbo
Developer
*****


Posts: 153
Group: Developers
Joined: Oct 2006
Status: Offline
Post: #2
RE: Future of Managed DirectX in Jade 2.0

Personally I favor the C++/CLI option. I know C++ (and especially C++/CLI) can be a real pain but it would remove the dependency to other peoples work and potentially give another speed boost.

If time is an issue I'd stick with SlimDX (if thats stable enough to use) and create the new direct renderer when the engine is stable.

Staying with MDX is not a very good option.

This post was last modified: 08-01-2007 01:56 AM by Quimbo.

08-01-2007 01:56 AM
Find all posts by this user Quote this message in a reply
Vicente
Administrator
*******


Posts: 972
Group: Administrators
Joined: Sep 2006
Status: Offline
Post: #3
RE: Future of Managed DirectX in Jade 2.0

The "end of MDX" day has come in the end :p Reed has done a very good analysis about our future options for Jade in the rendering arena for Windows.

I've been talking with Jader about this also, and well, I think that probably we should take the C++/CLI path. As Quimbo also said it saves us a dependency with another project (even if I think the work on SlimDX is very nice) and we don't really need a whole wrapper as we are using very small parts from DX right now. I think the speed boost in the engine will be pretty small (the wrapper should be quite thin) but this way we aren't adding more dependencies around to use only 10% of what they offer to us.

Keep the opinions coming people, this is quite an important affair right now, and maybe we are doing mistakes in our assumptions or there are things we haven't taken into account, so please post your point of view on this subject Smile

Regards!

Vicente

08-01-2007 12:09 PM
Visit this users website Find all posts by this user Quote this message in a reply
gonzo
Administrator
*******


Posts: 342
Group: Administrators
Joined: Sep 2006
Status: Offline
Post: #4
RE: Future of Managed DirectX in Jade 2.0

I'd say going the C++/CLI path is the best way to go, too, since staying with MDX is no option and before simply exchanging one layer/wrapper with the other, doing our own ligthweight thing seems to be the best solution.
That way we have full control from ground up and we can extend it easily to bring in more DX functionality whenever we see fit. The only question that comes in my mind is: Who should do it? Big Grin

08-01-2007 03:06 PM
Find all posts by this user Quote this message in a reply
Jader
Developer
*****


Posts: 292
Group: Developers
Joined: Sep 2006
Status: Offline
Post: #5
RE: Future of Managed DirectX in Jade 2.0

My opinion is that we should wait. There is a lot of things to do ( animation!!!! ) yet, and who knows what expect to the future. Perhaps withing six months, OGL 3.0 will be a reality, DX10 will work on XP and there is some nice wrapper to use. We can work on the engine, and when most of the features are present, we can think on MDX. As i said, maybe there are a lot of new options at the future...

08-01-2007 03:20 PM
Find all posts by this user Quote this message in a reply
gonzo
Administrator
*******


Posts: 342
Group: Administrators
Joined: Sep 2006
Status: Offline
Post: #6
RE: Future of Managed DirectX in Jade 2.0

Jader Wrote:
My opinion is that we should wait. There is a lot of things to do ( animation!!!! ) yet, and who knows what expect to the future. Perhaps withing six months, OGL 3.0 will be a reality, DX10 will work on XP and there is some nice wrapper to use. We can work on the engine, and when most of the features are present, we can think on MDX. As i said, maybe there are a lot of new options at the future...


Of course there are always new options comming in the future, but what I'm worrying about a bit is that Microsoft could stop releasing MDX completely as redistributable soon... this would prevent new users from using the current renderer, so we should at least have an alternative renderer to go with as soon as this happens.

This post was last modified: 08-01-2007 03:31 PM by gonzo.

08-01-2007 03:31 PM
Find all posts by this user Quote this message in a reply
Alikar
Software Engineer
***


Posts: 219
Group: Registered
Joined: Oct 2006
Status: Offline
Post: #7
RE: Future of Managed DirectX in Jade 2.0

I like the idea of making a new rendering wrapper in C++/CLI as I have had plenty of experience with C++ that it should be easy for me to read. Though I would say this is something that can wait, as I would like to see JAD 2.0 up and running first.

08-01-2007 04:48 PM
Find all posts by this user Quote this message in a reply
Reed
Developer
*****


Posts: 314
Group: Developers
Joined: Oct 2006
Status: Offline
Post: #8
RE: Future of Managed DirectX in Jade 2.0

Gonzo,

I highly doubt they would cut MDX entirely - they are not supporting it at this point, though, so the biggest fear would be having something like Vista sp1 (due out this year) causing an incompatibility with the current MDX, which in turn would cause MDX to stop functioning on Windows Vista.

I'm quite sensitive to issues like this - my company has actually been bitten by MS causing changes to the OS in a service pack that breaks old libraries, more than one time. If that happens, we'd have a significant period where nothing works, which is part of why I think it's important to at least bring this issue up.

Jader, I'm not too opposed to waiting, however, I do think that, if we're going to end up rewriting it to use C++/CLI, it'd be an easier transition now (since less is done) than later (when everything is in place). We do not use a large portion of D3D, so I don't think it would be that awful of a job.

OGL 3 will be a reality at some point, but it will be a while before people have hardware support for it. DX10 will probably never come to XP (MS has said this every time they've been asked, and it's in their best interest to keep it vista-only), and it looks like they have no plans to make or maintain their own managed wrappers other than XNA. That was why the C++ suggestion in the first place - C++ DX9 and DX10, and C OpenGL, are pretty much guaranteed to always exist, since that's how they are written natively.

But - even if official managed DX10 wrappers exist, we're still going to need a maintainable DX9 solution (at least for the next couple of years).

-Reed

08-01-2007 04:59 PM
Visit this users website Find all posts by this user Quote this message in a reply
Vicente
Administrator
*******


Posts: 972
Group: Administrators
Joined: Sep 2006
Status: Offline
Post: #9
RE: Future of Managed DirectX in Jade 2.0

Yeah, MS breaking apis in new releases happens more often than it should Sad I agree also that moving now is more interesting than continue working on a renderer we don't plan to support in the end (it is like wasting work time even if it's not much time at all).

Also, I could bet MDX10 won't ever come to happen, like DX10 on XP. Microsoft wants all their users migrating to Vista and XNA so releasing something like that would go against their own goals.

Regards!

Vicente

08-01-2007 05:25 PM
Visit this users website Find all posts by this user Quote this message in a reply
Jader
Developer
*****


Posts: 292
Group: Developers
Joined: Sep 2006
Status: Offline
Post: #10
RE: Future of Managed DirectX in Jade 2.0

Ok, so my prefered option is C++/CLI. It seems that we are doing all!!!!

08-01-2007 10:08 PM
Find all posts by this user Quote this message in a reply
Reed
Developer
*****


Posts: 314
Group: Developers
Joined: Oct 2006
Status: Offline
Post: #11
RE: Future of Managed DirectX in Jade 2.0

Well - I started putting this in place, although it has quite a ways to go.

So far, I removed the SlimDX project, and started a new C++ project. (Jade.Rendering.Dx9) I have the adapters initialized, and the plumbing in place for device creation.  I'm trying to get the hang of writing code in C++/CLI, but the porting should go pretty fast. Smile

There are actually some advantages to writing this in C++, I've found.  So far, with the little I've done, it seems that debugging is a bit more straightforward, since you're not trying to debug MDX and D3D at the same time.

Jader: Feel free to work with the MDX renderer still - if you want to add to it, please go ahead.  I've started implementing a C++ version, and will just copy over everything from the C#/MDX renderer when I get to that point.  Once I have the effect builder copied over, we can switch to developing against the new one.

-Reed

This post was last modified: 08-03-2007 01:45 AM by Reed.

08-03-2007 01:43 AM
Visit this users website Find all posts by this user Quote this message in a reply
Jader
Developer
*****


Posts: 292
Group: Developers
Joined: Sep 2006
Status: Offline
Post: #12
RE: Future of Managed DirectX in Jade 2.0

Great job!!!

08-03-2007 07:10 AM
Find all posts by this user Quote this message in a reply
Vicente
Administrator
*******


Posts: 972
Group: Administrators
Joined: Sep 2006
Status: Offline
Post: #13
RE: Future of Managed DirectX in Jade 2.0

As usual, nice news Reed Smile Regards!

Vicente

08-03-2007 07:24 AM
Visit this users website Find all posts by this user Quote this message in a reply
Alikar
Software Engineer
***


Posts: 219
Group: Registered
Joined: Oct 2006
Status: Offline
Post: #14
RE: Future of Managed DirectX in Jade 2.0

Sweet. I'm glad to hear its going well.

08-03-2007 03:12 PM
Find all posts by this user Quote this message in a reply
flopoloco
Forum Newbie
*


Posts: 23
Group: Registered
Joined: Feb 2008
Status: Offline
Post: #15
RE: Future of Managed DirectX in Jade 2.0

Cool, I would like to show (us) your work on the showcase area, so even more users could learn about JadeEngine. Smile

Keep up the good work.

09-18-2009 10:33 PM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Jade and Pluto migrated to 2008 Vicente 4 1,572 11-26-2008 12:44 AM
Last Post: Vicente
  Download Jade 2.0 Narven 1 1,273 05-01-2008 10:49 PM
Last Post: Vicente
  Current state of Jade Vicente 1 2,134 04-17-2008 04:50 AM
Last Post: Alikar
  Jade.Ai.Graphs ready Vicente 0 997 02-17-2008 06:41 PM
Last Post: Vicente
  To throw or not to throw (Jade.Ai.Graphs) Vicente 8 1,517 02-14-2008 09:28 AM
Last Post: Vicente
  diploma thesis in the scope of jade MichaelKnight 5 1,314 10-04-2007 07:34 PM
Last Post: Vicente
  Jade 2 GUI Lessman 10 1,848 07-19-2007 02:04 AM
Last Post: Steve
  Jade 2.0 Plans (Jade 1.2 plans before) Vicente 20 3,198 05-21-2007 06:45 PM
Last Post: Vicente

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: