Hello everyone. I just finished converting the main d3d9 headers. d3d9.h, d3d9types.h, and d3d9caps.h. I've included a simple test program that just creates a device and clears the backbuffer to blue. I have run across a small problem though. I am using the coinvoke macro from the standard COM in asm docs in the masm32 package and I noticed when calling clear that I need to pass in a floating point value (something MASM is not happy with). Luckily the value was just for the Z buffer clear depth so you can pass in 1, but I'd like any ideas on how to get around this problem easily in the future. Am I just going to have to manually invoke any function that needs a floating point passed in?

Anyway, I hope someone gets some use out of these things... they took forever, but I guess since I was doing them on the company's time I shouldn't complain, hehe :tongue: I'd really appreciate any feedback anyone has to offer. Cheers!

... Oh yeah, is the general opinion that I should leave these as individual files like the C headers, or should I combine them all into one massive include file?
Posted on 2003-06-12 05:05:37 by AlexEiffel
Good job, similar to mine, but I used no macros, and more complete. I only translated what I needed to get done.

If you plan to move on to the headers for d3dx9.lib, good luck. Microsoft made the lib file in a way that it is only compatible with VC C++. The only way to make with work with MASM is an ugly ugly hack, or maybe a wrapper lib made in C++.

Mind if I borrow some of the non-marco stuff to complete my incs? :grin:
Posted on 2003-06-12 06:51:34 by ThoughtCriminal
I was curious about how I was going ot end up doing the d3dx headers. I was looking over the headers and I have no idea how to translate classes... especially overloaded operators. I thought I've seen D3DX 8.1 includes on the board though, did MS change something in the D3DX9 libs or are the ones on the board using the hack you're talking about?

I just now tried writing and using the d3derr9 functions and I get linking errors for __vsnprintf, __vsnwprintf, and __chkstk. Any idea what that means?

I don't mind at all. Take whatever you'd like, macro or not :)
Posted on 2003-06-12 07:06:12 by AlexEiffel
__chkstk Is used buy C++(usually in debug mode)to make sure the stack is correct afer a function call. That however is the least of your problems.....

This is the thread I posted about my problems:

http://www.asmcommunity.net/board/index.php?topic=12481

They have a lots of C++/complier specific labels in the libs. Some is optimization hints,floating point support hints,etc.

I did get things to assemble using /FORCE when linking, but thats about the same as turning all error finding off.

I dont really have any idea how to make a wrapper lib, but I guess it would just need to expose the function entry points. Or maybe a c++ dll. Get rid of linking with any C++ code/libs alltogether...
Posted on 2003-06-12 14:12:48 by ThoughtCriminal