renderer: make lock fail textures dynamically loaded

this should reduce idle vram usage by a whopping 16MB, but also might fix the tty unknown issue.
This commit is contained in:
Vaxry 2025-06-19 13:46:42 +02:00
parent e999ad664d
commit 54ccf9c6b3
No known key found for this signature in database
GPG key ID: 665806380871D640
3 changed files with 41 additions and 13 deletions

View file

@ -249,6 +249,8 @@ class CHyprOpenGLImpl {
GLuint compileShader(const GLuint&, std::string, bool dynamic = false, bool silent = false);
void useProgram(GLuint prog);
void ensureLockTexturesRendered(bool load);
bool m_shadersInitialized = false;
SP<SPreparedShaders> m_shaders;
@ -329,7 +331,7 @@ class CHyprOpenGLImpl {
SP<CTexture> m_backgroundTexture;
SP<CTexture> m_lockDeadTexture;
SP<CTexture> m_lockDead2Texture;
SP<CTexture> m_lockTtyTextTexture; // TODO: don't always load lock
SP<CTexture> m_lockTtyTextTexture;
void logShaderError(const GLuint&, bool program = false, bool silent = false);
void createBGTextureForMonitor(PHLMONITOR);