- Joined
- Jan 28, 2009
- Messages
- 1,320
- Reaction score
- 616
BMP Font + unicode + Matrix (WARNING: Math Ahead!)
I have a problem with matrix in PT, all my matrices starting around same place (right of center).
I tried with many different matrices, results are minor. (0,0) is always around same place.
I extracted D3DTRANSFORMSTATE_PROJECTION matrix from PT but failed to find WORD and VIEW...
...using it still gives me same results. (not sure to what this matrix is related, I got it by hooking GetTransform)
I can move whole matrix to top-left corner but it's not very accurate and Y change for some reason when I change monitor resolution (not PT resolution) or run pt in full screen mode (it look like X stay same).
Right now I'm using D3DXMatrixOrthoLH method:
And not getting what I should get. :/
It would be nice to move my quad relatively to window resolution... e.g. from 0.0 to 1.0 (from 0% TO 100%).
O and since PT use mostly dx6.1 (can't find sdk :/) matrices are defined by D3DMATRIX and not D3DXMATRIX (unsure if I should mix those 2).
Any idea why I can't make working 2D matrix in PT?
Right now I'm using identity matrix and my quad stick to the center... but problem is that it stick to the center of whole screen so its reliable only in full screen mode. How to align it to the window? Do I need to create and set this matrix in some specific time? That's still a mystery for me.
I have a problem with matrix in PT, all my matrices starting around same place (right of center).
I tried with many different matrices, results are minor. (0,0) is always around same place.
I extracted D3DTRANSFORMSTATE_PROJECTION matrix from PT but failed to find WORD and VIEW...
Code:
3.351, 0.000, 0.000, 0.000
0.000, 2.681, 0.000, 0.000
0.000, 0.000, 1.005, 1.000
0.000, 0.000, -20.101, 0.000
I can move whole matrix to top-left corner but it's not very accurate and Y change for some reason when I change monitor resolution (not PT resolution) or run pt in full screen mode (it look like X stay same).
Right now I'm using D3DXMatrixOrthoLH method:
Code:
2/w 0 0 0
0 2/h 0 0
0 0 1/(zf-zn) 0
0 0 zn/(zn-zf) 1
And not getting what I should get. :/
It would be nice to move my quad relatively to window resolution... e.g. from 0.0 to 1.0 (from 0% TO 100%).
O and since PT use mostly dx6.1 (can't find sdk :/) matrices are defined by D3DMATRIX and not D3DXMATRIX (unsure if I should mix those 2).
Any idea why I can't make working 2D matrix in PT?
Right now I'm using identity matrix and my quad stick to the center... but problem is that it stick to the center of whole screen so its reliable only in full screen mode. How to align it to the window? Do I need to create and set this matrix in some specific time? That's still a mystery for me.
Attachments
You must be registered for see attachments list
Last edited: