I am the middle of re-coding a older project and I wanted to move it to another GUI framework. Although at the moment I would like to redo the existing code to work with the old framework to improve efficiency and moldularity, then migrate over to the new framework which I still need to read up on.
Problem:
Because they are different frameworks, they have different ways of rendering their contents. This is my issue. If I rebuild around the existing GUI then I would have to go back and rewrite everything pertaining to rendering. I do not want to do this.
My Solution:
The current solution that I am thinking of using is making a wrapper class for the renderer and using macros within the class to use the correct implementation at compilation. This way I do not need to rewrite all the rendering methods in the main program, but rather write new implementations of the rendering object.
Is my solution any good and is this the proper way to approach this problem?
I know people call the use of macros a unsafe and dirty practice. Is it in this case?
Tempus Edax Rerum