Jump to content
  • Advertisement
Sign in to follow this  
slowmike

source code for DirectX funtions

This topic is 4030 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Where exactly can I find the source code for the DirectX functions? ... more specifically the D3DX Math functions? I assumed that I had the documentations on my hard drive in the SDK folder, but if I do I can't locate them ... only the header files. Thanks.

Share this post


Link to post
Share on other sites
Advertisement
There's a difference between documentation and source code, what exactly are you looking for?

If it's documentation then it should be in the SDK(look for .chm help file).

If it's the source code to DirectX you won't find it, because then there would be other APIs like DirectX and I don't think Microsoft wants that. I suppose you could disassemble the DLLs, but that's probably illegal.

Share this post


Link to post
Share on other sites
Quote:
Original post by slowmike
... more importantly, how do people know how these functions are implemented?


A lot of the mathematics is fairly straightforward and should be covered in any decent graphics book, or linear algebra (or other math subject as appropriate) book. Once you understand the mathematics, the code is just implementation details, and not all that important.

Are you looking for details on something in particular?

Share this post


Link to post
Share on other sites
I don't know what everyone else is smoking but erm have you had a look at the inline file d3dx9math.inl. I'd guess that about 65% of the functions are there.

Quote:
how do people know how these functions are implemented?
I use my own so I'm not really bothered how they are implemented but its pretty simple maths really.

Share this post


Link to post
Share on other sites
Quote:
Original post by dmail
I don't know what everyone else is smoking but erm have you had a look at the inline file d3dx9math.inl. I'd guess that about 65% of the functions are there.

Quote:
how do people know how these functions are implemented?
I use my own so I'm not really bothered how they are implemented but its pretty simple maths really.


Yea, the Math 101 is the least likely to contain the problems.

DX however has a bit more than just basic algebra, and that source isn't available beyond the headers.

But that's besides the point.

The purpose of proprietary APIs is simply to expose some public interface, possibly keep some backdoors for yourself, but prevent others from accessing your stuff.

There's also nothing really useful in nVidia and ATI Linux drivers, yet they fought from releasing the source, causing all kinds of mess for users in between.

Providing full source makes it too easy to roll your own, even if for pointless purposes. Just removing 10% of the source solves the problem. Besides, the jist of DX is in the hardware.

Also - open source and source code availability for standard libraries is recently new occurance. Microsoft could be classified as generous these days compared to the old Microsoft.

Share this post


Link to post
Share on other sites
There is this site which I found a long time ago and bookmarked.

Apart from that you should be able to get a lot of the stuff from the .inl files in your SDK Include folder.

Regards,
ViLiO

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!