2017-01-20 08:36:52 -05:00
|
|
|
#pragma once
|
|
|
|
|
2017-01-19 16:23:59 -05:00
|
|
|
namespace Components
|
|
|
|
{
|
|
|
|
class Renderer : public Component
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
typedef void(BackendCallback)(IDirect3DDevice9*);
|
|
|
|
|
|
|
|
Renderer();
|
|
|
|
~Renderer();
|
|
|
|
|
|
|
|
static int Width();
|
|
|
|
static int Height();
|
|
|
|
|
|
|
|
static void OnBackendFrame(Utils::Slot<BackendCallback> callback);
|
2017-06-22 16:05:22 -04:00
|
|
|
static void OnNextBackendFrame(Utils::Slot<BackendCallback> callback);
|
2017-05-31 09:45:12 -04:00
|
|
|
static void OnDeviceRecoveryEnd(Utils::Slot<Scheduler::Callback> callback);
|
|
|
|
static void OnDeviceRecoveryBegin(Utils::Slot<Scheduler::Callback> callback);
|
2017-01-19 16:23:59 -05:00
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
static void FrameStub();
|
|
|
|
|
|
|
|
static void BackendFrameStub();
|
|
|
|
static void BackendFrameHandler();
|
|
|
|
|
2017-06-06 08:02:56 -04:00
|
|
|
static void PreVidRestart();
|
|
|
|
static void PostVidRestart();
|
|
|
|
static void PostVidRestartStub();
|
|
|
|
|
2018-12-24 15:42:39 -05:00
|
|
|
static void R_TextureFromCodeError(const char* sampler, Game::GfxCmdBufState* state);
|
|
|
|
static void StoreGfxBufContextPtrStub1();
|
|
|
|
static void StoreGfxBufContextPtrStub2();
|
|
|
|
|
2018-12-25 16:47:10 -05:00
|
|
|
static int DrawTechsetForMaterial(int a1, float a2, float a3, const char* material, Game::vec4_t* color, int a6);
|
|
|
|
|
2017-05-31 09:45:12 -04:00
|
|
|
static Utils::Signal<Scheduler::Callback> EndRecoverDeviceSignal;
|
|
|
|
static Utils::Signal<Scheduler::Callback> BeginRecoverDeviceSignal;
|
2017-01-19 16:23:59 -05:00
|
|
|
|
|
|
|
static Utils::Signal<BackendCallback> BackendFrameSignal;
|
2017-06-22 16:05:22 -04:00
|
|
|
static Utils::Signal<BackendCallback> SingleBackendFrameSignal;
|
2017-01-19 16:23:59 -05:00
|
|
|
};
|
|
|
|
}
|