summaryrefslogtreecommitdiff
path: root/src/managers/PointerManager.cpp
diff options
context:
space:
mode:
authorTom Englund <tomenglund26@gmail.com>2025-05-11 18:36:20 +0200
committerGitHub <noreply@github.com>2025-05-11 18:36:20 +0200
commit04124988e8b4a9cdfc5995388ebfaad0005b4b31 (patch)
treeb603b13ebf4d21d5c72ad774db630523e1eb65ed /src/managers/PointerManager.cpp
parent390a357859e702b6416194291e0eb168270d50ac (diff)
opengl: optimize shaders and reduce unneeded drawcalls (#10364)
* opengl: remove unnecessery glflush calls glflushing forces the driver to break batching and issue commands prematurely and prevents optimisations like command reordering and merging. many glFunctions already internally glflushes and eglsync creation still has a glflush at end render. so lets reduce the overhead of these calls. * opengl: reduce glUseProgram calls apitrace shows cases where the same program gets called multiple times, add a helper function that keeps track of current program and only call it once on same program. reduces slight overhead. * opengl: use more efficient vertex array object use a more modern vertex array object approach with the shaders, makes it a onetime setup on shader creation instead of once per drawcall, also should make the driver not have to revalidate the vertex format on each call.
Diffstat (limited to 'src/managers/PointerManager.cpp')
-rw-r--r--src/managers/PointerManager.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/managers/PointerManager.cpp b/src/managers/PointerManager.cpp
index 5415e7be..7bd66c5d 100644
--- a/src/managers/PointerManager.cpp
+++ b/src/managers/PointerManager.cpp
@@ -584,7 +584,6 @@ SP<Aquamarine::IBuffer> CPointerManager::renderHWCursorBuffer(SP<CPointerManager
g_pHyprOpenGL->renderTexture(texture, xbox, 1.F);
g_pHyprOpenGL->end();
- glFlush();
g_pHyprOpenGL->m_renderData.pMonitor.reset();
g_pHyprRenderer->onRenderbufferDestroy(RBO.get());