renderer: drastically optimize bg texture creation

stop loading 20MB images every time, dumbass
This commit is contained in:
vaxerski
2024-07-26 19:53:24 +02:00
parent 33a5c8ce32
commit 57371b93a0
2 changed files with 86 additions and 58 deletions

View File

@@ -274,6 +274,8 @@ class CHyprOpenGLImpl {
CShader m_sFinalScreenShader;
CTimer m_tGlobalTimer;
SP<CTexture> m_pBackgroundTexture;
void logShaderError(const GLuint&, bool program = false);
GLuint createProgram(const std::string&, const std::string&, bool dynamic = false);
GLuint compileShader(const GLuint&, std::string, bool dynamic = false);
@@ -282,6 +284,7 @@ class CHyprOpenGLImpl {
void initDRMFormats();
void initEGL(bool gbm);
EGLDeviceEXT eglDeviceFromDRMFD(int drmFD);
void createBackgroundTexture(const std::string& path);
//
std::optional<std::vector<uint64_t>> getModsForFormat(EGLint format);