Sign in to follow this  
Emil_Halim

Untitled

Recommended Posts

Emil_Halim    122
Hi everybody I do want to aviod using d3dx9_30.dll with my library. and i use some functions from it such as D3DXMatrixTranslation , D3DXMatrixRotationYawPitchRoll ... here is my transformation part D3DXMATRIX World,Rot,Scl,Trns; D3DXMatrixRotationYawPitchRoll(&Rot,0,0,mRotate); D3DXMatrixTranslation(&Trns,mTransX-mhalfScreenWidth, mhalfScreenHeight-mTransY,0); D3DXMatrixScaling( &Scl, mScaleX,mScaleY,1); World = Rot * Scl * Trns; DX9Device->SetTransform( D3DTS_WORLD, &World); so where can i get the source code of D3DXMatrixRotationYawPitchRoll ,D3DXMatrixTranslation , and D3DXMatrixScaling any help please ?

Share this post


Link to post
Share on other sites
Evil Steve    2017
You can't get the actual source code, but there's equations for crating various matrices all over the Internet. However, the D3DX ones are optimised to use SSE, 3DNow! and other instructions where available.

Why don't you want to link to d3dx9_30.dll? It shouldn't be a problem really, and you can just distribute the DX runtime with your app for users who don't have it.

EDIT: Why are you doing this: D3DXMatrixRotationYawPitchRoll(&Rot,0,0,mRotate);? What's wrong with D3DXMatrixRotationZ?

Share this post


Link to post
Share on other sites
Emil_Halim    122
Quote:
Original post by Evil Steve

Why don't you want to link to d3dx9_30.dll?

EDIT: Why are you doing this: D3DXMatrixRotationYawPitchRoll(&Rot,0,0,mRotate);? What's wrong with D3DXMatrixRotationZ?



Really I want to reduce the number of dll's those my library relies on, also i do not need all functions of d3dx9_30.dll ,just using set matrix functions and load textures functions.

I will replace the load texture function with static FreeImage library , but still stuck with
set matrix functions.

no problem of using D3DXMatrixRotationZ , it is just explanaition code.

Share this post


Link to post
Share on other sites
sirob    1181
The source code to the various D3DX functions, while generally trivial, isn't available publically, AFAIK.

Frankly, if you don't know how to implement these features, creating an application that does not use D3DX sounds out of your league.

If you're serious about this, now would be a good time to take a break, and learn some of the basics of linear algebra. Out of Jpetrie's list of recommended books, I think you could use a read of "Fundamentals of Computer Graphics" or "Geometry Toolbox" (or equivalent material online). That should provide you the base knowledge for performing pretty much anything D3DX does yourself.

Hope this helps.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this