   Passing variables around
  Okay, so I have this code to render a dialog box in DirectX that worked, un til I created a wrapper grpahics class for sprites and converted the code.It used to create matrices to transform an image to fit the dialog box desired width and height, then call SetTransform(&matrix); to apply them.Now it creates matrices etc, etc, but I call spriteSetTransform(matrix); now which calls SetTransform(&matrix); I was just wondering if putting through this wrapper function if it changes the data in any way, coz it doesn't work properly but compiles.   
  What's your matrix parameter passed by? Reference or pointer or by value? Depending on which you'll need to do different things.   ;  the directx function wants : CONST D3DXMATRIX *pTransformi create a d3dxmatrix and pass it using &matrix originallythen i created a function that gets passed d3dxmatrix and then passes that to directx function with &matrix   ;  Sounds like you're passing the D3DXMATRIX by value to your wrapper function.For efficiency reasons, that should be passed by either reference or pointer.Without knowing more, it's hard to say if that's what's causing your problems though.   ;  I have changed the code to pass by referencebut it still doens't work :@ The function returns S_OK so it sees the the paramters are correct, I just don't know what to do to fix it, I might post on DirectX forums.I had a similar problem getting it to originally work, but that was a while ago, a year or so in fact, and can't remember how I fixed it in the first place to work.Stupid wrapper classes.   