Replaced preprocessor macro by a flag to determine which render method to use.