Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 28 Sep 2007
Offline Last Active Dec 08 2013 10:04 AM

Posts I've Made

In Topic: Boost::thread - problems with inheritance

03 August 2013 - 01:02 PM

You guys are genius !!! Was struggling with getting my thread encapsulation done properly, that functor method in a struct of a base class did the job !!!



In Topic: How To Support D3D9 and D3D10 In One Game?

06 June 2009 - 04:23 PM

While I am no way qualified to answer your question, the problem origin (in my opinion) is almost the same of the Adapter design pattern.


Id say at some point you have to know the configuration of your client, is he running linux/windows and can he provide opengl/directx9,10 support. From there you can instanciate the good Renderer via a class that :


If you use polymorphism all of yours adapter must use the renderer interface (as pointed out by the guy 2 posts up) thus kind-of limiting you.

This pattern is best understood with an SQL connecter class example. If you have to provide the following functions : connectDB(name,ip), disconnect(), select(query), etc... You implement the MySQLAdapter, OracleSQLAdapter, MSSQLAdapter with the interface and you can pick up at run-time which class you want to instanciate.

In java : InterfaceDBConnecter myDBConnecter = new MySQLAdapter();