Is time you wasted gaining experience really wasted?

It sounds like you’ve been up to a lot since our last chat.

Well, kind of. I spent about a week completely screwing around with Direct3D9. All I wanted to do was have a WPF and Winforms control that I could get a device for and draw with, so that I could write an app that would allow me to debug certain issues. After a LOT of false starts, I eventually got there. I tried SlimDX, some random controls I found on the internet, but I always hit some hurdle or other and could never quite get where I wanted to be. This was mostly due to a lack of examples in SlimDX, and me only having a very basic clue on how to write Direct3D stuff, so I’ve decided to go with the native implementation and get rid of SlimDX completely (for now, anyway).

Direct3D9, isn’t that, like years old?

Yes, and that in itself is causing me massive headaches. And I mean *MASSIVE*. The underlying problem is that the way Direct3D works, is that when you do something wrong, you get a simple error code “Invalid Call”. You get no information about why it was invalid. To get that information, you need to turn on the Debug Runtime, and look at the console. The only problem with that, is that the Debug Runtime doesn’t work on windows 7. There are supposed to be work arounds, but really, I can’t be bothered with that. So, when I inevitable srew up, I’ve got absolutely no idea wThe reason I’m stuck with Direct3D9 is that Microsoft haven’t released a D3D10 or D3D11 managed wrapper (although SlimDX has, but see previous lack of examples. If I was more familiar with working with Direct3D, then I’m sure this wouldn’t be a problem). So, in short, I’m stuck in a really bad position when it comes to the Direct3D stuff.

Well that sounds pretty crap.

Yeah, I know. For now, there isn’t too much I can do about it, nor is that much I want to do about it. I have a couple of ideas going forward, one is to use it as an excuse to launch into C++ and D3D10/11 (which there is LOADS of documentation for), or try to move into SlimDX D3D10/11 (which involves trying to re-write the c++ documentation, but again, this mostly relies on having a solid understanding in the first place). I might look at getting some books. I think though, the C++/ interop way is interesting going forward, as it really does open up some interesting challenges, and lets face it, C++ interop is not going away any time soon!

 So when you got it working, what did you do with it?

Well, I spent a little time playing around with creating models by hand, which, let me tell you, is a royal pain in the arse. I’ve got quite a few thoughts going forward on that one, ranging from importing an off the shelf model format (although this sounds like a lot of work), writing an editor to assist manually editing the vertex and index information (and don’t forget texture information as well!) Although this, too sounds like like a lot of work. In short, working with models is going to be a lot of work, and I’m a little concerned that working with a dead technology (D3D9) is going to render a lot of the work out of date too… Still, I’ve got lots of other things to fix before the model front really becomes an issue.

You mentioned something about a bug you managed to fix?

Yeah, so once I had a few models to play with, I wrote a little app with multiple rendered controls to allow me to set up and visualise scenarios (mostly around the interception code initially) to see what and how things were going wrong, and to see if my understanding of the maths around space translations was correct (It was and it wasn’t).

So, I’m gonna leave that here, cos I’ve got a lot more still to write on that subject, and it’ll probably take a blog post up all on its own. Till next time!

This entry was posted in Project Icarus. Bookmark the permalink.

Leave a Reply