Checkout this example renderer. It isn't optimized but for a first pass I'm happy. Build with visual studio.