They're back, and this time brains are off the menu!
Yes folks, in order to use RotateAxisLocal functions on a D3DXMatrixStack, you need to instantiate a D3DXVECTOR3 class and fill in it's members, just to pass 3 float args!
Lesson for OOP programmers - lighten up! You don't need to write everything as a class, sometimes keeping it simple works best.
Here's some advice for Microsoft regarding Direct 3D:
- I've ported most of Quake to Direct3D in less than a single day, including time off for sleep, food, and other essentials. So should Microsoft. It's one of the simplest real-world OpenGL applications out there, and would provide a great practical example of using real-world Direct 3D as part of the SDK.
- They should swallow their pride and accept the GPL. It won't poison them, and there would be a fantastic block of usable (and re-usable) Direct 3D code out there for people to learn from and do what they want with.
- Don't use fancy pants wrapper classes or frameworks, keep it as simple procedural code so that people can see step-by-step what's happening where and when. Their job is to demonstrate an API, not show off how great their programmers are.
- Relate each block of Direct 3D code to it's corresponding block of OpenGL code by way of comments; this would make things so much easier for anyone else porting an application.
- Document things correctly! Don't scatter vital information off in obscure places. Do the D3DXCreateTexture functions accept non power of 2 textures? Do they scale them up or down? Can the programmer choose the behaviour? I'm sure these are all documented somewhere, but where is anybody's guess. The OpenGL Reference Manual is a great example of exactly the kind of precise documentation about a function's behaviour I mean.
- Write the process up as a case study so that people can read it and determine exactly what decisions were made and why they were made. This would be fantastic reference material for anyone in a position where they're making similar decisions, and would be straight from the people who know the API best.
- Finally, a pet peeve - sort out Matrixes! Seriously, the API is truly vile here. Either use the D3DXMatrixStack methods in the SDK examples (so much easier and cleaner) or just copy how OpenGL does it (ditto).
1 comments:
You're a busy boy at the moment fella! Keen to see what you come up with - think it was this time of year that you came to my attention a while back with MHcolour. Been loads of good stuff since.
Cheers, kempie
Post a Comment