Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

#Actualjwezorek

Posted 03 February 2012 - 02:34 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 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.

#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.

PARTNERS