mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-10 09:01:55 -07:00
Compare commits
8 Commits
v0.15.2bet
...
v0.15.3bet
Author | SHA1 | Date | |
---|---|---|---|
|
8880298f50 | ||
|
d89355f0a6 | ||
|
ae91f6610f | ||
|
6e7143e0f5 | ||
|
f55f56f260 | ||
|
7e781f24c5 | ||
|
3bf7c5aea1 | ||
|
092dbda88a |
8
Makefile
8
Makefile
@@ -93,19 +93,19 @@ wlr-output-power-management-unstable-v1-protocol.o: wlr-output-power-management-
|
|||||||
|
|
||||||
legacyrenderer:
|
legacyrenderer:
|
||||||
mkdir -p build && cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DLEGACY_RENDERER:STRING=true -H./ -B./build -G Ninja
|
mkdir -p build && cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DLEGACY_RENDERER:STRING=true -H./ -B./build -G Ninja
|
||||||
cmake --build ./build --config Release --target all -j $(nproc)
|
cmake --build ./build --config Release --target all -j$(shell nproc)
|
||||||
|
|
||||||
legacyrendererdebug:
|
legacyrendererdebug:
|
||||||
mkdir -p build && cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Debug -DLEGACY_RENDERER:STRING=true -H./ -B./build -G Ninja
|
mkdir -p build && cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Debug -DLEGACY_RENDERER:STRING=true -H./ -B./build -G Ninja
|
||||||
cmake --build ./build --config Release --target all -j $(nproc)
|
cmake --build ./build --config Release --target all -j$(shell nproc)
|
||||||
|
|
||||||
release:
|
release:
|
||||||
mkdir -p build && cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -H./ -B./build -G Ninja
|
mkdir -p build && cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -H./ -B./build -G Ninja
|
||||||
cmake --build ./build --config Release --target all -j $(nproc)
|
cmake --build ./build --config Release --target all -j$(shell nproc)
|
||||||
|
|
||||||
debug:
|
debug:
|
||||||
mkdir -p build && cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Debug -H./ -B./build -G Ninja
|
mkdir -p build && cmake --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Debug -H./ -B./build -G Ninja
|
||||||
cmake --build ./build --config Debug --target all -j $(nproc)
|
cmake --build ./build --config Debug --target all -j$(shell nproc)
|
||||||
|
|
||||||
clear:
|
clear:
|
||||||
rm -rf build
|
rm -rf build
|
||||||
|
6
flake.lock
generated
6
flake.lock
generated
@@ -26,11 +26,11 @@
|
|||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"host": "gitlab.freedesktop.org",
|
"host": "gitlab.freedesktop.org",
|
||||||
"lastModified": 1665331677,
|
"lastModified": 1665405587,
|
||||||
"narHash": "sha256-3Dh1i11mHK80jx5figC1oh1V0rCjieh0Mj+MajXdbPw=",
|
"narHash": "sha256-lVL48azhjGA/oEIcUSZQNwomNs0EzPxCcjgzyDST0PM=",
|
||||||
"owner": "wlroots",
|
"owner": "wlroots",
|
||||||
"repo": "wlroots",
|
"repo": "wlroots",
|
||||||
"rev": "ab8341975e62b1f668d8c9779ec8e72d04718a99",
|
"rev": "221ee83d440fb7dcbfd141ef3a459a5a973331b6",
|
||||||
"type": "gitlab"
|
"type": "gitlab"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@@ -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]);
|
||||||
|
@@ -323,16 +323,13 @@ 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);
|
|
||||||
|
|
||||||
wlr_matrix_transpose(glMatrix, 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);
|
||||||
|
|
||||||
glUseProgram(m_RenderData.pCurrentMonData->m_shQUAD.program);
|
glUseProgram(m_RenderData.pCurrentMonData->m_shQUAD.program);
|
||||||
|
|
||||||
glUniformMatrix3fv(m_RenderData.pCurrentMonData->m_shQUAD.proj, 1, GL_FALSE, glMatrix);
|
glUniformMatrix3fv(m_RenderData.pCurrentMonData->m_shQUAD.proj, 1, GL_TRUE, glMatrix);
|
||||||
glUniform4f(m_RenderData.pCurrentMonData->m_shQUAD.color, col.r / 255.f, col.g / 255.f, col.b / 255.f, col.a / 255.f);
|
glUniform4f(m_RenderData.pCurrentMonData->m_shQUAD.color, col.r / 255.f, col.g / 255.f, col.b / 255.f, col.a / 255.f);
|
||||||
|
|
||||||
wlr_box transformedBox;
|
wlr_box transformedBox;
|
||||||
@@ -414,9 +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);
|
|
||||||
|
|
||||||
wlr_matrix_transpose(glMatrix, glMatrix);
|
|
||||||
|
|
||||||
CShader* shader = nullptr;
|
CShader* shader = nullptr;
|
||||||
|
|
||||||
@@ -444,7 +438,7 @@ void CHyprOpenGLImpl::renderTextureInternalWithDamage(const CTexture& tex, wlr_b
|
|||||||
|
|
||||||
glUseProgram(shader->program);
|
glUseProgram(shader->program);
|
||||||
|
|
||||||
glUniformMatrix3fv(shader->proj, 1, GL_FALSE, glMatrix);
|
glUniformMatrix3fv(shader->proj, 1, GL_TRUE, glMatrix);
|
||||||
glUniform1i(shader->tex, 0);
|
glUniform1i(shader->tex, 0);
|
||||||
glUniform1f(shader->alpha, alpha / 255.f);
|
glUniform1f(shader->alpha, alpha / 255.f);
|
||||||
glUniform1i(shader->discardOpaque, (int)discardOpaque);
|
glUniform1i(shader->discardOpaque, (int)discardOpaque);
|
||||||
@@ -534,8 +528,6 @@ CFramebuffer* CHyprOpenGLImpl::blurMainFramebufferWithDamage(float a, wlr_box* p
|
|||||||
|
|
||||||
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);
|
|
||||||
wlr_matrix_transpose(glMatrix, glMatrix);
|
|
||||||
|
|
||||||
// get the config settings
|
// get the config settings
|
||||||
static auto *const PBLURSIZE = &g_pConfigManager->getConfigValuePtr("decoration:blur_size")->intValue;
|
static auto *const PBLURSIZE = &g_pConfigManager->getConfigValuePtr("decoration:blur_size")->intValue;
|
||||||
@@ -570,7 +562,7 @@ CFramebuffer* CHyprOpenGLImpl::blurMainFramebufferWithDamage(float a, wlr_box* p
|
|||||||
glUseProgram(pShader->program);
|
glUseProgram(pShader->program);
|
||||||
|
|
||||||
// prep two shaders
|
// prep two shaders
|
||||||
glUniformMatrix3fv(pShader->proj, 1, GL_FALSE, glMatrix);
|
glUniformMatrix3fv(pShader->proj, 1, GL_TRUE, glMatrix);
|
||||||
glUniform1f(pShader->radius, *PBLURSIZE * (a / 255.f)); // this makes the blursize change with a
|
glUniform1f(pShader->radius, *PBLURSIZE * (a / 255.f)); // this makes the blursize change with a
|
||||||
if (pShader == &m_RenderData.pCurrentMonData->m_shBLUR1)
|
if (pShader == &m_RenderData.pCurrentMonData->m_shBLUR1)
|
||||||
glUniform2f(m_RenderData.pCurrentMonData->m_shBLUR1.halfpixel, 0.5f / (m_RenderData.pMonitor->vecPixelSize.x / 2.f), 0.5f / (m_RenderData.pMonitor->vecPixelSize.y / 2.f));
|
glUniform2f(m_RenderData.pCurrentMonData->m_shBLUR1.halfpixel, 0.5f / (m_RenderData.pMonitor->vecPixelSize.x / 2.f), 0.5f / (m_RenderData.pMonitor->vecPixelSize.y / 2.f));
|
||||||
@@ -845,16 +837,13 @@ 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);
|
|
||||||
|
|
||||||
wlr_matrix_transpose(glMatrix, 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);
|
||||||
|
|
||||||
glUseProgram(m_RenderData.pCurrentMonData->m_shBORDER1.program);
|
glUseProgram(m_RenderData.pCurrentMonData->m_shBORDER1.program);
|
||||||
|
|
||||||
glUniformMatrix3fv(m_RenderData.pCurrentMonData->m_shBORDER1.proj, 1, GL_FALSE, glMatrix);
|
glUniformMatrix3fv(m_RenderData.pCurrentMonData->m_shBORDER1.proj, 1, GL_TRUE, glMatrix);
|
||||||
glUniform4f(m_RenderData.pCurrentMonData->m_shBORDER1.color, col.r / 255.f, col.g / 255.f, col.b / 255.f, col.a / 255.f);
|
glUniform4f(m_RenderData.pCurrentMonData->m_shBORDER1.color, col.r / 255.f, col.g / 255.f, col.b / 255.f, col.a / 255.f);
|
||||||
|
|
||||||
const auto TOPLEFT = Vector2D(round, round);
|
const auto TOPLEFT = Vector2D(round, round);
|
||||||
@@ -1103,16 +1092,13 @@ 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);
|
|
||||||
|
|
||||||
wlr_matrix_transpose(glMatrix, 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);
|
||||||
|
|
||||||
glUseProgram(m_RenderData.pCurrentMonData->m_shSHADOW.program);
|
glUseProgram(m_RenderData.pCurrentMonData->m_shSHADOW.program);
|
||||||
|
|
||||||
glUniformMatrix3fv(m_RenderData.pCurrentMonData->m_shSHADOW.proj, 1, GL_FALSE, glMatrix);
|
glUniformMatrix3fv(m_RenderData.pCurrentMonData->m_shSHADOW.proj, 1, GL_TRUE, glMatrix);
|
||||||
glUniform4f(m_RenderData.pCurrentMonData->m_shSHADOW.color, col.r / 255.f, col.g / 255.f, col.b / 255.f, col.a / 255.f * a);
|
glUniform4f(m_RenderData.pCurrentMonData->m_shSHADOW.color, col.r / 255.f, col.g / 255.f, col.b / 255.f, col.a / 255.f * a);
|
||||||
|
|
||||||
const auto TOPLEFT = Vector2D(range + round, range + round);
|
const auto TOPLEFT = Vector2D(range + round, range + round);
|
||||||
|
@@ -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
|
||||||
|
Submodule subprojects/wlroots updated: ab8341975e...221ee83d44
Reference in New Issue
Block a user