View previous topic :: View next topic |
Author |
Message |
smjg
Joined: 29 Sep 2004 Posts: 41
|
Posted: Fri Oct 10, 2008 8:33 pm Post subject: Status of WindowsAPI directx modules |
|
|
A number of modules under win32/directx were labelled as beta. I've had a look, and come to the conclusion that none of them are in fact so (except possibly dxerr now that I've fixed a compile error therein).
It appears that the DirectX headers have to a fair extent been translated without any reference to the translation instructions, and fail to follow them in a number of ways such as:
- constants left individually declared, rather than grouped into enum blocks or bulk const declarations
- interleaved function prototypes and version(Unicode) blocks, rather than consolidated
- blocks indented with spaces instead of tabs
- parts not aligned in columns as they should be
The exception is d3dx10misc.d, which doesn't seem to have any specific violations of the translation instructions, but I still feel that we need more of the house style specified before we can call it polished. In particular, I'm not sure how the extern(Windows) attributes in the interfaces (which I presume someone has established are necessary) should be formatted, but we should expand the spec for translating COM interfaces to address this issue.
I've just removed the false beta statuses from DirectX modules. Some of them might be alpha, but I've set them to compiles pending proper checking. There might be others that are labelled alpha but actually aren't, but I haven't taken the time to look through them. Hardly any of them have pragma(lib)s, for a start.
Getting the statuses right is a prerequisite to knowing how much more work needs to be done. Now that I've removed some status labels that indicated a more advanced status than is actually there, we should be nearer to this goal.
Wishing the project a good future,
Stewart. |
|
Back to top |
|
|
WeirdCat
Joined: 29 Apr 2007 Posts: 19
|
Posted: Sun Oct 12, 2008 4:43 am Post subject: Re: Status of WindowsAPI directx modules |
|
|
smjg wrote: | * constants left individually declared, rather than grouped into enum blocks or bulk const declarations
* interleaved function prototypes and version(Unicode) blocks, rather than consolidated |
I've only grouped constants that are related to each other. Overall the original D3D10 headers have already a pretty good differentiation between single constants and enums. It doesn't make much sense to break them up by hook or by crook. The original D3D header files have a very high update frequency from M$ and the more you change the order of symbols/function prototypes in the translation the more time-consuming each update becomes and the easier you overlook new symbols or functions. So I decided to minimize the change of order of symbols and functions to a minimum.
smjg wrote: | * blocks indented with spaces instead of tabs
* parts not aligned in columns as they should be |
I'm always using tabs to indent with only some well considered exceptions. For example if a return statement needs more than one line, I'm using a mixture of spaces and tabs to account for different lengths of tabs.
smjg wrote: | Hardly any of them have pragma(lib)s, for a start. |
In my observation the current implementation of "pragma(lib)" is not reliable. The linker ignores them very often, so that you have to add the libs manually anyway. But none the less I don't think I forgot to add any of them. Which files do you think are missing?
smjg wrote: | Getting the statuses right is a prerequisite to knowing how much more work needs to be done. Now that I've removed some status labels that indicated a more advanced status than is actually there, we should be nearer to this goal. |
I've just removed my name from the "assigned to" field because I don't think I have the time/leisure to work on these files for the time being, because one of my hard disks crashed 2 weeks ago and I lost (among other things) all of my source codes of the last 3 years and I think I will take this as the inducement to return to VC - at least for the foreseeable future.
LLAP,
Sascha |
|
Back to top |
|
|
smjg
Joined: 29 Sep 2004 Posts: 41
|
Posted: Sun Oct 12, 2008 8:54 am Post subject: Re: Status of WindowsAPI directx modules |
|
|
WeirdCat wrote: | smjg wrote: | * blocks indented with spaces instead of tabs
* parts not aligned in columns as they should be |
I'm always using tabs to indent with only some well considered exceptions. For example if a return statement needs more than one line, I'm using a mixture of spaces and tabs to account for different lengths of tabs. |
This is similar to how I indent. A declaration, statement or enum value always begins on a line indented only by tabs, but spaces may be used to indent subsequent lines thereof below this level. Some of the enums in d3dx10tex are space-indented, but this seems to have been an oversight and would be a trivial fix.
WeirdCat wrote: | smjg wrote: | Hardly any of them have pragma(lib)s, for a start. |
In my observation the current implementation of "pragma(lib)" is not reliable. The linker ignores them very often, so that you have to add the libs manually anyway. But none the less I don't think I forgot to add any of them. Which files do you think are missing? |
Are you observing this from
- running DMD to do the compile and link in one go?
- using bud?
- invoking the compiler and linker separately, either manually or through a makefile?
If a or b, it should work. If c, then AIUI the pragma(lib) declarations don't get as far as the linker. As for which are missing, I suppose I'll have to look into how the DirectX .lib files are organised. It could be that I'm just used to the pattern that nearly every module in this project has one.
WeirdCat wrote: |
I've just removed my name from the "assigned to" field because I don't think I have the time/leisure to work on these files for the time being, because one of my hard disks crashed 2 weeks ago and I lost (among other things) all of my source codes of the last 3 years and I think I will take this as the inducement to return to VC - at least for the foreseeable future. |
When had you last done a backup??
Stewart. |
|
Back to top |
|
|
WeirdCat
Joined: 29 Apr 2007 Posts: 19
|
Posted: Sun Oct 12, 2008 9:30 am Post subject: Re: Status of WindowsAPI directx modules |
|
|
smjg wrote: | Some of the enums in d3dx10tex are space-indented, but this seems to have been an oversight and would be a trivial fix. |
Oops, I didn't see that indeed.
smjg wrote: | If a or b, it should work. If c, then AIUI the pragma(lib) declarations don't get as far as the linker. |
I always used makefiles to first build a win32.lib and then build the rest of my projects in one step. Because (a) is much to slow and I don't like other build tools than make.
smjg wrote: | When had you last done a backup?? |
The problem was, I had all my current backups temporarily on this hard disc, since all the other discs where nearly full and the last backup on a DVD was 3 years old. I think I've proved Murphy is right. Since then I have an automatic daily backup routine running.
LLAP,
Sascha |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|