This is a very minimal example of how to use LibOVR (Oculus Rift SDK), using Direct HMD Access mode and Direct3D 11. There are some comments, but it is mainly intended as a reference how to get something to appear on the HMD. Error handling, architecture and good practice in general is ignored for simplicity and is instead left as an exercise to the reader.
Further compilation instructions are available in the code as comments.