summaryrefslogtreecommitdiff
path: root/src/render/Texture.hpp
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2024-07-22 13:01:55 +0200
committerVaxry <vaxry@vaxry.net>2024-07-22 13:01:55 +0200
commit1797319a0785cf9ae4f406d40bc27b032c6f5fb2 (patch)
tree95c5f204e9abbc5e5828ebb81d9f64e64e7861ed /src/render/Texture.hpp
parent5979ceb56b165ee35809a0eeda5f4be1aedbb7b6 (diff)
renderer: untransform textures matching display transform
fixes #6754 This will break if the client uses a transform that is not equal to the display, reverting to old behavior. Combining transforms is left as a todo for the future.
Diffstat (limited to 'src/render/Texture.hpp')
-rw-r--r--src/render/Texture.hpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/render/Texture.hpp b/src/render/Texture.hpp
index 0da95300..a54be8c5 100644
--- a/src/render/Texture.hpp
+++ b/src/render/Texture.hpp
@@ -2,9 +2,11 @@
#include "../defines.hpp"
#include <aquamarine/buffer/Buffer.hpp>
+#include <hyprutils/math/Misc.hpp>
class IHLBuffer;
HYPRUTILS_FORWARD(Math, CRegion);
+using namespace Hyprutils::Math;
enum TEXTURETYPE {
TEXTURE_INVALID, // Invalid
@@ -33,11 +35,12 @@ class CTexture {
void allocate();
void update(uint32_t drmFormat, uint8_t* pixels, uint32_t stride, const CRegion& damage);
- TEXTURETYPE m_iType = TEXTURE_RGBA;
- GLenum m_iTarget = GL_TEXTURE_2D;
- GLuint m_iTexID = 0;
- Vector2D m_vSize;
- void* m_pEglImage = nullptr;
+ TEXTURETYPE m_iType = TEXTURE_RGBA;
+ GLenum m_iTarget = GL_TEXTURE_2D;
+ GLuint m_iTexID = 0;
+ Vector2D m_vSize = {};
+ void* m_pEglImage = nullptr;
+ eTransform m_eTransform = HYPRUTILS_TRANSFORM_NORMAL;
private:
void createFromShm(uint32_t drmFormat, uint8_t* pixels, uint32_t stride, const Vector2D& size);