In issue #18, we want to convert the model/shader names back to strings. This is, perhaps, not the best idea. Instead, we could start implementing the basic requirements for a plugin architecture for SIMTOI's models/shaders by moving them into factory classes. The idea is described here. Basically, we create an abstract base class for models which requires the following functions be defined:
shared_ptr<Base> Create()
string GetName()
The Create() function then does something like this:
In issue #18, we want to convert the model/shader names back to strings. This is, perhaps, not the best idea. Instead, we could start implementing the basic requirements for a plugin architecture for SIMTOI's models/shaders by moving them into factory classes. The idea is described here. Basically, we create an abstract base class for models which requires the following functions be defined:
The
Create()
function then does something like this:Then to make everything work we define a singleton
Factory
class which has a a map and register function:Then, later on, the registering of models could be done via. a plugin architecture. For now we can just hard-code functions like: