Because OpenGL is so different in the 3.x version than the previous versions I’ve been reading up on DirectX for a few days and so far there has been only a few small confusions about different things. DirectX is however pretty similar to OpenGL so it isn’t that big of a jump for me.
Since I am pretty much re-writing my 3d engine in DirectX from my prototype in OpenGL I’ve got a clear image of the things I need to do, so I started with my model-loader and trying to convert that to work in DirectX.
This is what I’ve got so far, Take a look:
Now this does look pretty disastrous, but it shows that my custom model-format works in DX as well as OGL! 😀
However, I am exaggerating a small bit there, the texture coordinates and the normals of that model are pretty broken because the loader (so far) cannot handle them, I am yet to figure out a solution for that, in fact, I’m working on it as I type this.
I haven’t got that big plans for this engine just yet, my first target is to get the model-loading from my custom .SA3 files to load properly. After that I guess I’ll have a go with DX’s shader capabilities and see what I can do with those. If I can manage to make my normalmapping shader from earlier work in my own engine, all the better. 😀
Furthermore I am intrigued by how many things DX has out-of-the-box compared to OpenGL. Given that, I can also assume that those things are far from the best around but it gives beginners to DX a head-start in their development.
That’s all for now, I’m going to keep working on the model loader, I feel the solution for my (two) problems isn’t that distant.
Edit* I fixed one of the problems. Fact is that it was working all this time. The problem was that I was transforming the model and rotating it 90 degrees in the exporter. This made the model normals recieve lighting even if they were facing away from the lightsource.