Jump to content

  • Log In with Google      Sign In   
  • Create Account

We need your help!

We need 7 developers from Canada and 18 more from Australia to help us complete a research survey.

Support our site by taking a quick sponsored survey and win a chance at a $50 Amazon gift card. Click here to get started!


Member Since 23 Mar 2012
Offline Last Active Mar 22 2013 03:46 PM

Posts I've Made

In Topic: D3D11CreateDevice failed

16 March 2013 - 03:28 AM

My solution was to uninstall the update and now everything works fine:


How to uninstall update 2670838

To uninstall update 2670838, follow these steps:

  1. Click Start, click Control Panel, click Programs, and then click Programs and Features.
  2. Click View installed updates.
  3. Click Update for Microsoft Windows (KB 2670838), and then click Uninstall.

In Topic: D3D10CreateDeviceAndSwapChain fails in debug mode

16 March 2013 - 03:26 AM

Yup - thats it.
KB 2670838 has stopped debug mode working. The link you pasted above leads on to a more detailed debate, but my solution was to uninstall this update and now everything works fine.


Going to switch off automatic updates from now on.





In Topic: GPU Particle Class Design

05 October 2012 - 05:38 PM

Sorry, solved it. I have created a shader variable (g_createExplosion). On each frame if this is set to true it will kick off another cycle of particles without effecting the existing ones.

In Topic: Quaternion x,y,z rotation

06 September 2012 - 07:06 AM

Thanks for you help. It has taken me a day of playing with a toy aeroplane to work it out, but I have got it working and the resulting code is posted below. The major problem was that I needed to maintain state of my complete model transform and the 3 axis. My game actor now has a stateful tranformation matrix (m_transform) and 3 stateful axis (m_XAxis, m_YAxis and m_ZAxis).

[source lang="cpp"]void GameActor::VUpdate(float elapsedTime){ D3DXQUATERNION qX; D3DXQUATERNION qY; D3DXQUATERNION qZ; D3DXMATRIX matRotX; D3DXMATRIX matRotY; D3DXMATRIX matRotZ; D3DXMATRIX rotation; //calculate incremental change for 3 axis D3DXQuaternionRotationAxis(&qX,&m_Xaxis,m_rotation.x); D3DXQuaternionRotationAxis(&qY,&m_Yaxis,m_rotation.y); D3DXQuaternionRotationAxis(&qZ,&m_Zaxis,m_rotation.z); //get matix rotations for each axis. D3DXMatrixRotationQuaternion(&matRotX,&qX); D3DXMatrixRotationQuaternion(&matRotY,&qY); D3DXMatrixRotationQuaternion(&matRotZ,&qZ); //calculate final rotation. This will still have slight errors as the axis were //not recalculated between calls to D3DXMatrixRotationQuaternion above, but //the are insignificant. rotation=matRotX*matRotY*matRotZ; //modify the stateful transform m_transform=m_transform*rotation; //will add scale and move later. These will both need to be stateless. //modify the stateful axis D3DXVECTOR4 vec4X; D3DXVec3Transform(&vec4X, &m_Xaxis, &rotation); m_Xaxis=D3DXVECTOR3(vec4X.x,vec4X.y,vec4X.z); //realign Y axis D3DXVECTOR4 vec4Y; D3DXVec3Transform(&vec4Y, &m_Yaxis, &rotation); m_Yaxis=D3DXVECTOR3(vec4Y.x,vec4Y.y,vec4Y.z); //realign Z axis D3DXVECTOR4 vec4Z; D3DXVec3Transform(&vec4Z, &m_Zaxis, &rotation); m_Zaxis=D3DXVECTOR3(vec4Z.x,vec4Z.y,vec4Z.z);}[/source]

I still may still be able to make this faster and with less lines of code. Perhaps use QuaternionRotationYawPitchRoll. If anyone can see how to do this in a better way then please say.


In Topic: Quaternion x,y,z rotation

05 September 2012 - 06:59 AM

In answer to 'what I am expecting':

I have a model of an aircraft. I am looking down on it sitting on the runway. the z axis points out of the screen, the y axis points up and the x axis off to the right. The aircraft is pointing up at the top of the screen.

If I press the Y key I expect it to rotate along the planes fuselage (roll), if I press the X key I expect pitch and Z yaw.

I get all these actions if I only press a single key - this is because model space and world space are initially aligned.

The GameActor class is mine and is very transient at the moment. I can/will add any members and methods which enable me to provide motion. Note that the GameActor code only provides accessors so I seen no point in posting it. The meat of what I am trying to do is posted in my code above.

I sort of understand where you are coming from, and I have read elsewhere that you cannot simply convert Euler angles to quats like this. OK so if I can't rotate around X, then Y, then Z what should my approach be? +1 for that.

Do I need to do something with my axis vectors (axisX/Y/Z in the code above)? Is it wrong to specify them the way I have?

Should I store a single quat as a member of my GameActor class and apply rotations on this - I have read this somewhere, but I cannot see how a single quat would work.