mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-12 22:28:32 +09:00
[Fix] (MG_Backend/DirectGLES): don't glFlush on present
This commit is contained in:
@@ -2317,11 +2317,8 @@ namespace MobileGL::MG_Backend::DirectGLES {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static Bool PresentStatsEnabled() {
|
static Bool PresentStatsEnabled() {
|
||||||
static const Bool enabled = [] {
|
const char* value = std::getenv("MOBILEGL_GLES_PRESENT_STATS");
|
||||||
const char* value = std::getenv("MOBILEGL_GLES_PRESENT_STATS");
|
return value != nullptr && value[0] != '\0' && std::strcmp(value, "0") != 0;
|
||||||
return value != nullptr && value[0] != '\0' && std::strcmp(value, "0") != 0;
|
|
||||||
}();
|
|
||||||
return enabled;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void DumpDefaultFramebufferStats() {
|
static void DumpDefaultFramebufferStats() {
|
||||||
@@ -2581,13 +2578,7 @@ namespace MobileGL::MG_Backend::DirectGLES {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Present() {
|
void Present() {
|
||||||
if (g_Display != EGL_NO_DISPLAY && g_Surface != EGL_NO_SURFACE) {
|
|
||||||
DumpDefaultFramebufferStats();
|
|
||||||
if (g_GLESFuncs.glFlush) {
|
|
||||||
g_GLESFuncs.glFlush();
|
|
||||||
}
|
|
||||||
g_EGLFuncs.eglSwapBuffers(g_Display, g_Surface);
|
g_EGLFuncs.eglSwapBuffers(g_Display, g_Surface);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DestroyEGLContext() {
|
void DestroyEGLContext() {
|
||||||
|
|||||||
Reference in New Issue
Block a user