Stuck on Bug

You may need to revert to an older version to see Rendering core in
working order. But you can see here where I'm trying to change how
rendering core works. Currently, when you do Run() in d3dUtil, it takes
all logic flow in order to loop. I want to make another method in there,
Render(), which does the exact same thing but once without looping, and
it's fine if we have to call it every frame. No matter what I try,
though, I can't get it to work, always one Direct X problem after
another. I think I ended up breaking how Run() originally ran, so look
at the old version of code for that. Anyway, I'm stuck for now, I've
stayed up way to late, and I'm going to bed for now. I would highly
appreciate if they could get rendering to render a frame without
stealing logic flow from main to loop forever. Multithreading maybe?