Maps buffer for writing and returns its memory as floats. Call unmap before uploading.
if mapping fails.