47 lines
1.3 KiB
C++
47 lines
1.3 KiB
C++
#ifndef GAME_WINDOW_H
|
|
#define GAME_WINDOW_H
|
|
|
|
#include "tier0/platform.h"
|
|
#include "tier2/iappsystem.h"
|
|
#include "materialsystem/humandevice_enums.h"
|
|
|
|
typedef void ( *KeyCallbackFn )( EInputDeviceType eDevice, EInputButton eButton, bool bIsPressed );
|
|
typedef void ( *AxisCallbackFn )( EInputDeviceType eDevice, EInputAxis eAxis, float fd );
|
|
|
|
class IImage;
|
|
abstract_class IGameWindow: public IAppSystem
|
|
{
|
|
public:
|
|
virtual void Frame( float fDelta ) = 0;
|
|
|
|
virtual uint32_t GetRenderWidth() = 0;
|
|
virtual uint32_t GetRenderHeight() = 0;
|
|
virtual bool BRenderSizeUpdated() = 0;
|
|
|
|
virtual void SetOutputImage( IImage *pImage ) = 0;
|
|
virtual IImage *GetOutputImage() = 0;
|
|
|
|
virtual void SetKeyCallback( KeyCallbackFn fn ) = 0;
|
|
virtual void SetAxisCallback( AxisCallbackFn fn ) = 0;
|
|
|
|
virtual void *CreateVulkanSurface( void *pInstance ) = 0;
|
|
virtual void DestroyVulkanSurface( void *pInstance ) = 0;
|
|
};
|
|
|
|
abstract_class IGameWindowManager: public IAppSystem
|
|
{
|
|
public:
|
|
virtual void Frame( float fDelta ) = 0;
|
|
|
|
virtual IGameWindow *CreateWindow() = 0;
|
|
virtual void DestroyWindow( IGameWindow* pWindow ) = 0;
|
|
|
|
virtual int GetVulkanInstanceExtensionCount() = 0;
|
|
virtual const char **GetVulkanInstanceExtensions() = 0;
|
|
};
|
|
|
|
IGameWindowManager *GameWindowManager();
|
|
#define GAME_WINDOW_MANAGER_INTERFACE_VERSION "GameWindowMgr001"
|
|
|
|
#endif
|