2016-07-31 14:46:22 -04:00
|
|
|
namespace Components
|
|
|
|
{
|
|
|
|
class Renderer : public Component
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
typedef void(Callback)();
|
|
|
|
typedef void(BackendCallback)(IDirect3DDevice9*);
|
|
|
|
|
|
|
|
Renderer();
|
|
|
|
~Renderer();
|
2016-08-15 10:40:30 -04:00
|
|
|
|
|
|
|
#ifdef DEBUG
|
|
|
|
const char* GetName() { return "Renderer"; };
|
|
|
|
#endif
|
2016-07-31 14:46:22 -04:00
|
|
|
|
|
|
|
static int Width();
|
|
|
|
static int Height();
|
|
|
|
|
|
|
|
static void Once(Callback* callback);
|
|
|
|
static void OnFrame(Callback* callback);
|
|
|
|
static void OnBackendFrame(BackendCallback* callback);
|
|
|
|
|
|
|
|
private:
|
|
|
|
static void FrameStub();
|
|
|
|
static void FrameHandler();
|
|
|
|
|
|
|
|
static void BackendFrameStub();
|
|
|
|
static void BackendFrameHandler();
|
|
|
|
|
|
|
|
static wink::signal<wink::slot<Callback>> FrameSignal;
|
|
|
|
static wink::signal<wink::slot<Callback>> FrameOnceSignal;
|
|
|
|
static wink::signal<wink::slot<BackendCallback>> BackendFrameSignal;
|
|
|
|
static Utils::Hook DrawFrameHook;
|
|
|
|
};
|
|
|
|
}
|