230 DirectX::XMMATRIX View = DirectX::XMMatrixIdentity();
231 DirectX::XMMATRIX Model = CalculateModel();
234 DirectX::XMMATRIX Projection = CalculateProjection(DirectX::XMLoadFloat3(&leftEye));
235 DirectX::XMMATRIX MVP = Model * View * Projection;
236 TransformationData.Transformation = MVP;
237 renderer.GetContext()->UpdateSubresource(TransformationBuffer, 0,
nullptr, &TransformationData, 0, 0);
238 renderer.GetContext()->VSSetConstantBuffers(0, 1, &TransformationBuffer);
241 D3D11_VIEWPORT Viewport;
242 Viewport.TopLeftX = 0.0f;
243 Viewport.TopLeftY = 0.0f;
244 Viewport.Width = renderWidth;
245 Viewport.Height = renderHeight;
246 Viewport.MinDepth = 0.0f;
247 Viewport.MaxDepth = 1.0f;
248 renderer.GetContext()->RSSetViewports(1, &Viewport);
254 Projection = CalculateProjection(DirectX::XMLoadFloat3(&rightEye));
255 MVP = Model * View * Projection;
256 TransformationData.Transformation = MVP;
257 renderer.GetContext()->UpdateSubresource(TransformationBuffer, 0,
nullptr, &TransformationData, 0, 0);
258 renderer.GetContext()->VSSetConstantBuffers(0, 1, &TransformationBuffer);
261 Viewport.TopLeftX = renderWidth;
262 renderer.GetContext()->RSSetViewports(1, &Viewport);