mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-06 15:11:57 -07:00
Change matrixProjection function stop use matrixFlip180 everywhere.
This commit is contained in:
@@ -178,7 +178,7 @@ bool isNumber(const std::string& str, bool allowfloat) {
|
|||||||
std::string copy = str;
|
std::string copy = str;
|
||||||
if (*copy.begin() == '-')
|
if (*copy.begin() == '-')
|
||||||
copy = copy.substr(1);
|
copy = copy.substr(1);
|
||||||
|
|
||||||
if (copy.empty())
|
if (copy.empty())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@@ -331,7 +331,7 @@ void logSystemInfo() {
|
|||||||
Debug::log(LOG, "Node name: %s", unameInfo.nodename);
|
Debug::log(LOG, "Node name: %s", unameInfo.nodename);
|
||||||
Debug::log(LOG, "Release: %s", unameInfo.release);
|
Debug::log(LOG, "Release: %s", unameInfo.release);
|
||||||
Debug::log(LOG, "Version: %s", unameInfo.version);
|
Debug::log(LOG, "Version: %s", unameInfo.version);
|
||||||
|
|
||||||
Debug::log(NONE, "\n");
|
Debug::log(NONE, "\n");
|
||||||
|
|
||||||
const std::string GPUINFO = execAndGet("lspci -vnn | grep VGA");
|
const std::string GPUINFO = execAndGet("lspci -vnn | grep VGA");
|
||||||
@@ -357,8 +357,8 @@ void matrixProjection(float mat[9], int w, int h, wl_output_transform tr) {
|
|||||||
// Rotation + reflection
|
// Rotation + reflection
|
||||||
mat[0] = x * t[0];
|
mat[0] = x * t[0];
|
||||||
mat[1] = x * t[1];
|
mat[1] = x * t[1];
|
||||||
mat[3] = y * -t[3];
|
mat[3] = y * t[3];
|
||||||
mat[4] = y * -t[4];
|
mat[4] = y * t[4];
|
||||||
|
|
||||||
// Translation
|
// Translation
|
||||||
mat[2] = -copysign(1.0f, mat[0] + mat[1]);
|
mat[2] = -copysign(1.0f, mat[0] + mat[1]);
|
||||||
@@ -401,4 +401,4 @@ int64_t getPPIDof(int64_t pid) {
|
|||||||
} catch (std::exception& e) {
|
} catch (std::exception& e) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -323,7 +323,6 @@ void CHyprOpenGLImpl::renderRectWithDamage(wlr_box* box, const CColor& col, pixm
|
|||||||
|
|
||||||
float glMatrix[9];
|
float glMatrix[9];
|
||||||
wlr_matrix_multiply(glMatrix, m_RenderData.projection, matrix);
|
wlr_matrix_multiply(glMatrix, m_RenderData.projection, matrix);
|
||||||
wlr_matrix_multiply(glMatrix, matrixFlip180, glMatrix);
|
|
||||||
|
|
||||||
glEnable(GL_BLEND);
|
glEnable(GL_BLEND);
|
||||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||||
@@ -412,7 +411,6 @@ void CHyprOpenGLImpl::renderTextureInternalWithDamage(const CTexture& tex, wlr_b
|
|||||||
|
|
||||||
float glMatrix[9];
|
float glMatrix[9];
|
||||||
wlr_matrix_multiply(glMatrix, m_RenderData.projection, matrix);
|
wlr_matrix_multiply(glMatrix, m_RenderData.projection, matrix);
|
||||||
wlr_matrix_multiply(glMatrix, matrixFlip180, glMatrix);
|
|
||||||
|
|
||||||
CShader* shader = nullptr;
|
CShader* shader = nullptr;
|
||||||
|
|
||||||
@@ -840,7 +838,6 @@ void CHyprOpenGLImpl::renderBorder(wlr_box* box, const CColor& col, int round) {
|
|||||||
|
|
||||||
float glMatrix[9];
|
float glMatrix[9];
|
||||||
wlr_matrix_multiply(glMatrix, m_RenderData.projection, matrix);
|
wlr_matrix_multiply(glMatrix, m_RenderData.projection, matrix);
|
||||||
wlr_matrix_multiply(glMatrix, matrixFlip180, glMatrix);
|
|
||||||
|
|
||||||
glEnable(GL_BLEND);
|
glEnable(GL_BLEND);
|
||||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||||
@@ -1096,7 +1093,6 @@ void CHyprOpenGLImpl::renderRoundedShadow(wlr_box* box, int round, int range, fl
|
|||||||
|
|
||||||
float glMatrix[9];
|
float glMatrix[9];
|
||||||
wlr_matrix_multiply(glMatrix, m_RenderData.projection, matrix);
|
wlr_matrix_multiply(glMatrix, m_RenderData.projection, matrix);
|
||||||
wlr_matrix_multiply(glMatrix, matrixFlip180, glMatrix);
|
|
||||||
|
|
||||||
glEnable(GL_BLEND);
|
glEnable(GL_BLEND);
|
||||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||||
|
@@ -12,11 +12,6 @@
|
|||||||
#include "Texture.hpp"
|
#include "Texture.hpp"
|
||||||
#include "Framebuffer.hpp"
|
#include "Framebuffer.hpp"
|
||||||
|
|
||||||
inline const float matrixFlip180[] = {
|
|
||||||
1.0f, 0.0f, 0.0f,
|
|
||||||
0.0f, -1.0f, 0.0f,
|
|
||||||
0.0f, 0.0f, 1.0f,
|
|
||||||
};
|
|
||||||
inline const float fullVerts[] = {
|
inline const float fullVerts[] = {
|
||||||
1, 0, // top right
|
1, 0, // top right
|
||||||
0, 0, // top left
|
0, 0, // top left
|
||||||
|
Reference in New Issue
Block a user