I'm not sure what the visitor pattern is giving you over simple C-style compile time polymorphism in which you have one .h file with different .cpp implementations for each output graphics library. You know, you have protypes like void RenderSprite(SpriteType ... ) and then have implementations for OpenGl and DirectX or whatever in separate cpp's.
Or if that's too old-fashioned, the same idea done with templates.
Show differencesHistory of post edits
#1jwezorek
Posted 03 February 2012 - 02:31 PM
I'm not sure what the visitor pattern is giving you over simple C-style compile time polymorphism in which you have one .h file with different .cpp implementations for output devices (or libraries). Or if that's too old-fashioned, the same idea done with templates.