2023-10-21 15:15:48 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "Framebuffer.hpp"
|
|
|
|
|
2023-10-21 20:25:44 +02:00
|
|
|
struct SRenderData;
|
|
|
|
|
2023-10-21 15:15:48 +02:00
|
|
|
// A window transformer can be attached to a window.
|
|
|
|
// If any is attached, Hyprland will render the window to a separate fb, then call the transform() func with it,
|
|
|
|
// and finally render it back to the main fb after all transformers pass.
|
2023-10-21 20:25:44 +02:00
|
|
|
//
|
|
|
|
// Worth noting transformers for now only affect the main pass (not popups)
|
2023-10-21 15:15:48 +02:00
|
|
|
class IWindowTransformer {
|
|
|
|
public:
|
|
|
|
// called by Hyprland. For more data about what is being rendered, inspect render data.
|
|
|
|
// returns the out fb.
|
|
|
|
virtual CFramebuffer* transform(CFramebuffer* in) = 0;
|
2023-10-21 20:25:44 +02:00
|
|
|
|
|
|
|
// called by Hyprland before a window main pass is started.
|
|
|
|
virtual void preWindowRender(SRenderData* pRenderData);
|
2023-10-21 15:15:48 +02:00
|
|
|
};
|