Untitled

Started by
2 comments, last by sirob 16 years, 8 months ago
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 ?
Advertisement
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?
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.
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.
Sirob Yes.» - status: Work-O-Rama.

This topic is closed to new replies.

Advertisement