mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-07-31 04:01:56 -07:00
@@ -179,17 +179,6 @@ void CToplevelExportProtocolManager::captureToplevel(wl_client* client, wl_resou
|
||||
|
||||
g_pHyprRenderer->makeEGLCurrent();
|
||||
|
||||
if (g_pHyprOpenGL->m_mMonitorRenderResources.contains(PMONITOR)) {
|
||||
const auto& RDATA = g_pHyprOpenGL->m_mMonitorRenderResources.at(PMONITOR);
|
||||
// bind the fb for its format. Suppress gl errors.
|
||||
#ifndef GLES2
|
||||
glBindFramebuffer(GL_READ_FRAMEBUFFER, RDATA.offloadFB.m_iFb);
|
||||
#else
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, RDATA.offloadFB.m_iFb);
|
||||
#endif
|
||||
} else
|
||||
Debug::log(ERR, "No RDATA in toplevelexport???");
|
||||
|
||||
PFRAME->shmFormat = g_pHyprOpenGL->getPreferredReadFormat(PMONITOR);
|
||||
if (PFRAME->shmFormat == DRM_FORMAT_INVALID) {
|
||||
Debug::log(ERR, "No format supported by renderer in capture toplevel");
|
||||
|
@@ -2286,10 +2286,10 @@ inline const SGLPixelFormat GLES2_FORMATS[] = {
|
||||
};
|
||||
|
||||
uint32_t CHyprOpenGLImpl::getPreferredReadFormat(CMonitor* pMonitor) {
|
||||
GLint glf = -1, glt = -1, as = -1;
|
||||
glGetIntegerv(GL_IMPLEMENTATION_COLOR_READ_FORMAT, &glf);
|
||||
GLint glf = -1, glt = -1, as = 0;
|
||||
/*glGetIntegerv(GL_IMPLEMENTATION_COLOR_READ_FORMAT, &glf);
|
||||
glGetIntegerv(GL_IMPLEMENTATION_COLOR_READ_TYPE, &glt);
|
||||
glGetIntegerv(GL_ALPHA_BITS, &as);
|
||||
glGetIntegerv(GL_ALPHA_BITS, &as);*/
|
||||
|
||||
if (glf == 0 || glt == 0) {
|
||||
glf = drmFormatToGL(pMonitor->drmFormat);
|
||||
|
Reference in New Issue
Block a user