I'm trying the magic particle wrapper for directX and integrate with my system.
Because the D3D device is create myself, therefore , I inherit MP_Device_WRAP and pass the device into it.
Currently, I load the resource "example3d.ptc" along with dx_wrapper project , so far I can see the "particle" , somehow it's locate with my camera, I can only see some part of this particle ( 'cause it keep rotates itself )
Therefore, I'm trying sync. the view matrix of MP and my system, but I fail.
what I do is
1. each loop update, I wrap my view matrix to D3DXMATRIX like this:
- Code: Select all
GlueMatrix d3dwrap( viewMatrix ) ;
D3DXMATRIX view = d3dwrap ;
Magic_SetViewMatrix((MAGIC_MATRIX*)&view);
2. render some my stuff
3. update and render MP like this
- Code: Select all
MP_Manager& MP=MP_Manager::GetInstance();
MP.UpdateByTimer() ;
MP.Render();
However, no matter how I change the camera position, and confirm the matrix do change, the particle still follows my camera. ( can't see the whole particle )
Is there something I go wrong?
Or magic particle will alter/reset my d3d device matrix ?
NDark