Working for Clear and drawPrimitive in basic application.
Alt-tab breaks rendering on return to d3d application. Currently working on that.