int stride = (int) (sizeOf(Float.class) * 3);
immediateContext.IASetVertexBuffers(0, 1, pointerToPointer(pointerTo(vertexBuffer)), pointerToInt(stride), pointerToInt(0));
// Set shaders and input layout
immediateContext.IASetInputLayout(layout);
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);