Simplified dll exported functions to one function
Fixed render to buffer to correctly size window