immediateContext.VSSetShader(pointerTo(vs), null, 0);
immediateContext.PSSetShader(pointerTo(ps), null, 0);
// Update rotation matrix for triangle
D3DXMatrixRotationZ(pointerTo(mat), angle.addAndGet(1) * 0.01f);
D3D11_MAPPED_SUBRESOURCE mappedData = immediateContext.Map(constBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0);
pointerTo(mat).copyTo(mappedData.pData());
immediateContext.Unmap(constBuffer, 0);
immediateContext.VSSetConstantBuffers(0, 1, pointerToPointer(pointerTo(constBuffer)));
// Set primitive topology and draw