pass render function into window creation

Fixes building.