Files
Aerofoil/GpCommon/GpDisplayDriverProperties.h

49 lines
1.3 KiB
C
Raw Permalink Normal View History

2019-12-21 18:40:17 -05:00
#pragma once
#include "EGpDisplayDriverType.h"
2019-12-31 05:20:07 -05:00
#include "GpDisplayDriverTickStatus.h"
2019-12-21 18:40:17 -05:00
#include <stdint.h>
2019-12-21 18:40:17 -05:00
struct IGpDisplayDriver;
struct IGpFiber;
2019-12-24 02:35:24 -05:00
struct IGpVOSEventQueue;
struct IGpLogDriver;
struct IGpSystemServices;
2021-04-28 01:46:07 -04:00
struct IGpAllocator;
2019-12-21 18:40:17 -05:00
struct GpDisplayDriverProperties
{
2019-12-31 05:20:07 -05:00
typedef GpDisplayDriverTickStatus_t (*TickFunc_t)(void *context, IGpFiber *vosFiber);
2019-12-21 18:40:17 -05:00
typedef void(*RenderFunc_t)(void *context);
typedef bool(*AdjustRequestedResolutionFunc_t)(void *context, uint32_t &physicalWidth, uint32_t &physicalHeight, uint32_t &virtualWidth, uint32_t &virtualheight, float &pixelScaleX, float &pixelScaleY);
2019-12-21 18:40:17 -05:00
EGpDisplayDriverType m_type;
unsigned int m_frameTimeLockNumerator;
unsigned int m_frameTimeLockDenominator;
unsigned int m_frameTimeLockMinNumerator;
unsigned int m_frameTimeLockMinDenominator;
unsigned int m_frameTimeLockMaxNumerator;
unsigned int m_frameTimeLockMaxDenominator;
2019-12-22 00:35:30 -05:00
void *m_osGlobals;
2019-12-21 18:40:17 -05:00
// Tick function and context to call when a frame needs to be served.
TickFunc_t m_tickFunc;
void *m_tickFuncContext;
RenderFunc_t m_renderFunc;
void *m_renderFuncContext;
2019-12-24 02:35:24 -05:00
AdjustRequestedResolutionFunc_t m_adjustRequestedResolutionFunc;
void *m_adjustRequestedResolutionFuncContext;
2019-12-24 02:35:24 -05:00
IGpVOSEventQueue *m_eventQueue;
IGpLogDriver *m_logger;
IGpSystemServices *m_systemServices;
2021-04-28 01:46:07 -04:00
IGpAllocator *m_alloc;
2019-12-21 18:40:17 -05:00
};