如何正确旋转在X11

我正在尝试在DirectX中旋转纹理四边形,但是我认为我错过了一些东西。 我很确定这是因为我正在应用转换到WorldMatrix而不是ObjectWorld,但是我没有一个对象的世界matrix,所以我不确定我将如何得到,因为我不存储太多,除了纹理和位置4个顶点直接到缓冲区,只在需要的时候更新。

这是我所尝试过的

bool GraphicsClass::Render(float deltatime) { D3DXMATRIX worldMatrix, viewMatrix, projectionMatrix, orthoMatrix, rotationZ; bool result; // Clear the buffers to begin the scene. m_D3D->BeginScene(0.0f, 0.0f, 0.0f, 0.0f); // Generate the view matrix based on the camera's position. m_Camera->Render(); //DrawingStuff // Get the world, view, projection, and ortho matrices from the camera and d3d objects. m_Camera->GetViewMatrix(viewMatrix); m_D3D->GetWorldMatrix(worldMatrix); m_D3D->GetProjectionMatrix(projectionMatrix); m_D3D->GetOrthoMatrix(orthoMatrix); //Transform World Matrix with a rotation matrix D3DXMatrixRotationZ(&rotationZ, 90.0f); D3DXMatrixMultiply(&worldMatrix, &worldMatrix, &rotationZ); // Turn off the Z buffer to begin all 2D rendering. m_D3D->TurnZBufferOff(); // Put the bitmap vertex and index buffers on the graphics pipeline to prepare them for drawing. result = m_Bitmap->Render(m_D3D->GetDeviceContext(), 124, 124); if(!result) { return false; } // Render the bitmap with the texture shader. result = m_TextureShader->Render(m_D3D->GetDeviceContext(), m_Bitmap->GetIndexCount(), worldMatrix, viewMatrix, orthoMatrix, m_Bitmap->GetTexture()); if(!result) { return false; } // Turn the Z buffer back on now that all 2D rendering has completed. m_D3D->TurnZBufferOn(); // Present the rendered scene to the screen. m_D3D->EndScene(); return true; } 

完整的代码实际上可以从http://www.rastertek.com/dx11tut05.html下载,但是从最后一帧开始,使用自定义定时器类(这不是由它们提供的)一些小的调整,但大体上是相同的。

我确实发现这个http://www.rastertek.com/dx11tut25.html ,我可能会尝试实现但是,这不是真的是我想要的,我想要旋转实际四,而不是纹理。