opengl: publicize shader creation/usage functions (#10378)
Some checks are pending
Build Hyprland / Build Hyprland (Arch) (push) Waiting to run
Build Hyprland / Build Hyprland with Meson (Arch) (push) Waiting to run
Build Hyprland / Build Hyprland without precompiled headers (Arch) (push) Waiting to run
Build Hyprland / Build Hyprland in pure Wayland (Arch) (push) Waiting to run
Build Hyprland / Code Style (Arch) (push) Waiting to run
Nix (CI) / update-inputs (push) Waiting to run
Nix (CI) / build (push) Waiting to run
Security Checks / Flawfinder Checks (push) Waiting to run

Allows plugins to create and use shaders again
This commit is contained in:
outfoxxed 2025-05-12 05:15:47 -07:00 committed by GitHub
parent 04124988e8
commit da3583fd5e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -240,6 +240,11 @@ class CHyprOpenGLImpl {
EGLImageKHR createEGLImage(const Aquamarine::SDMABUFAttrs& attrs);
bool initShaders();
GLuint createProgram(const std::string&, const std::string&, bool dynamic = false, bool silent = false);
GLuint compileShader(const GLuint&, std::string, bool dynamic = false, bool silent = false);
void useProgram(GLuint prog);
bool m_shadersInitialized = false;
SP<SPreparedShaders> m_shaders;
@ -321,15 +326,12 @@ class CHyprOpenGLImpl {
SP<CTexture> m_lockTtyTextTexture; // TODO: don't always load lock
void logShaderError(const GLuint&, bool program = false, bool silent = false);
GLuint createProgram(const std::string&, const std::string&, bool dynamic = false, bool silent = false);
GLuint compileShader(const GLuint&, std::string, bool dynamic = false, bool silent = false);
void createBGTextureForMonitor(PHLMONITOR);
void initDRMFormats();
void initEGL(bool gbm);
EGLDeviceEXT eglDeviceFromDRMFD(int drmFD);
void initAssets();
void initMissingAssetTexture();
void useProgram(GLuint prog);
//
std::optional<std::vector<uint64_t>> getModsForFormat(EGLint format);