renderer: overhaul renderModifData

This commit is contained in:
vaxerski
2024-01-07 18:35:44 +01:00
parent 9f2bde925b
commit 44ee9915e3
4 changed files with 53 additions and 16 deletions

View File

@@ -36,8 +36,17 @@ enum eDiscardMode {
};
struct SRenderModifData {
Vector2D translate = {};
float scale = 1.f;
enum eRenderModifType {
RMOD_TYPE_SCALE, /* scale by a float */
RMOD_TYPE_SCALECENTER, /* scale by a float from the center */
RMOD_TYPE_TRANSLATE, /* translate by a Vector2D */
RMOD_TYPE_ROTATE, /* rotate by a float in rad from top left */
RMOD_TYPE_ROTATECENTER, /* rotate by a float in rad from center */
};
std::vector<std::pair<eRenderModifType, std::any>> modifs;
void applyToBox(CBox& box);
};
struct SGLPixelFormat {