LPDIRECT3d vs IDirect3D
I don't believe that there is a difference. They both compile with no errors.
Not even sure why there are two, but I never really liked the first convention, so I guess someone at MS didn't either.
Not even sure why there are two, but I never really liked the first convention, so I guess someone at MS didn't either.
There is no difference, as LPDIRECT3D9 is a simple typedef. You could argue that the DX interfaces aren't meant to be new/deleted, and from that point of view prefer the typedef I suppose, but personally, I find typedefing pointers away to be less clear style-wise (also I don't like caps ), so I use IDirect3D9 *.
Thanks, was just curious cause I have been trying to pass my LPDIRECT3DDEVICE9 g_pd3dDevice to a function
and then do a simple operation like ->SetTransform on it.... and its not working, hehe
and then do a simple operation like ->SetTransform on it.... and its not working, hehe
passingmy function header:
BOOL Transformations(LPDIRECT3DDEVICE9 g_pd3dDevice)
inside the function I do this
D3DXMATRIXA16 matProj;
D3DXMatrixPerspectiveFovLH(&matProj, D3DX_PI/4, 1.0f, 1.0f, 100.0f);
g_pd3dDevice->SetTransform(D3DTS_PROJECTION, &matProj);
it compiles correctly
but nothing appears on the screen (obviously i am passing g_pd3dDevice and doing more than just a transformation) that was just an example.
im not really sure whats wrong
and I can't debug it.... when i step through line by line... its saying int = 59,385 and its goign to lines that say return FALSE; yet its not even returning... im confused.
So I can't even see if my int is correct
BOOL Transformations(LPDIRECT3DDEVICE9 g_pd3dDevice)
inside the function I do this
D3DXMATRIXA16 matProj;
D3DXMatrixPerspectiveFovLH(&matProj, D3DX_PI/4, 1.0f, 1.0f, 100.0f);
g_pd3dDevice->SetTransform(D3DTS_PROJECTION, &matProj);
it compiles correctly
but nothing appears on the screen (obviously i am passing g_pd3dDevice and doing more than just a transformation) that was just an example.
im not really sure whats wrong
and I can't debug it.... when i step through line by line... its saying int = 59,385 and its goign to lines that say return FALSE; yet its not even returning... im confused.
So I can't even see if my int is correct
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement