Files
funnygame/materialsystem/materialsystem.cpp

41 lines
925 B
C++

#include "materialsystem/imaterialsystem.h"
#include "igamewindow.h"
class CMaterialSystem: public IMaterialSystem
{
public:
virtual void Init() override;
virtual void Frame( float fTime ) override;
virtual void Shutdown() override;
virtual void RenderGameWindow( IGameWindow *pWindow ) override;
};
EXPOSE_INTERFACE(CMaterialSystem, IMaterialSystem, MATERIAL_SYSTEM_INTERFACE_NAME)
extern IRenderContext *g_pVkRenderContext;
IRenderContext *g_pRenderContext;
void CMaterialSystem::Init()
{
g_pRenderContext = (IRenderContext*)CreateInterface(RENDER_CONTEXT_INTERFACE_NAME, NULL);
g_pRenderContext->Init();
}
void CMaterialSystem::Frame( float fTime )
{
g_pRenderContext->Frame(fTime);
}
void CMaterialSystem::RenderGameWindow( IGameWindow *pWindow )
{
g_pRenderContext->RenderGameWindow( pWindow );
}
void CMaterialSystem::Shutdown()
{
g_pRenderContext->Shutdown();
}
IMaterialSystem *g_pMaterialSystem;