Plugin library caching.
Existing plugin system has one big flaw. The Engine
don't have any data about loaded plugin libraries.
Solution
Let's make a new class that represents loaded plugin library:
class CPluginModule : public CResource
{
public:
HINSTANCE _hiLibrary;
Then create own CResourceStock
for them:
class CResourceStock_CPluginModule : public CResourceStock
{
Let's rewrite CPluginClass
like this:
class CPluginClass : public CResource
{
public:
CPluginModule *_pModule; // Replacement for 'HINSTANCE _hiLibrary;'
So if we want to load CShaderClass
or CEntityClass
- we should obtain the CPluginModule
.
Edited by zcaliptium