Last active
March 15, 2023 00:26
-
-
Save ericoporto/463bf3ded3920ab80d7ee69911dfd67c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Engine/gfx/ali3dogl.cpp b/Engine/gfx/ali3dogl.cpp | |
index 51c3f3e..eb1c676 100644 | |
--- a/Engine/gfx/ali3dogl.cpp | |
+++ b/Engine/gfx/ali3dogl.cpp | |
@@ -269,10 +269,13 @@ void OGLGraphicsDriver::InitGlParams(const DisplayMode &mode) | |
glClearColor(0.0f, 0.0f, 0.0f, 1.0f); | |
glClear(GL_COLOR_BUFFER_BIT); | |
+ Debug::Printf(kDbgMsg_Info, "OGL: Vsync mode is %d.", mode.Vsync); | |
_capsVsync = SDL_GL_SetSwapInterval(mode.Vsync ? 1 : 0) == 0; | |
if (mode.Vsync && !_capsVsync) | |
Debug::Printf(kDbgMsg_Warn, "WARNING: Vertical sync could not be enabled. Setting will be kept at driver default."); | |
+ Debug::Printf(kDbgMsg_Info, "OGL: SwapInterval initialized with %d.", SDL_GL_GetSwapInterval()); | |
+ | |
#if AGS_PLATFORM_OS_IOS | |
// Setup library mouse to have 1:1 coordinate transformation. | |
// NOTE: cannot move this call to general mouse handling mode. Unfortunately, much of the setup and rendering | |
@@ -1263,7 +1266,9 @@ void OGLGraphicsDriver::_render(bool clearDrawListAfterwards) | |
glFinish(); | |
+ Debug::Printf(kDbgMsg_Info, "OGL: Will Swap Window"); | |
SDL_GL_SwapWindow(_sdlWindow); | |
+ Debug::Printf(kDbgMsg_Info, "OGL: Swap Window happened"); | |
if (clearDrawListAfterwards) | |
{ | |
@@ -2049,9 +2054,10 @@ void OGLGraphicsDriver::SetScreenTint(int red, int green, int blue) | |
bool OGLGraphicsDriver::SetVsyncImpl(bool enabled, bool &vsync_res) | |
{ | |
+ Debug::Printf(kDbgMsg_Info, "OGL: SetVsyncImpl (%d) called", enabled); | |
if (SDL_GL_SetSwapInterval(enabled) != 0) | |
{ | |
- Debug::Printf(kDbgMsg_Error, "OGL: SetVsync (%d) failed: %s", enabled, SDL_GetError()); | |
+ Debug::Printf(kDbgMsg_Error, "OGL: SetVsyncImpl (%d) failed: %s", enabled, SDL_GetError()); | |
return false; | |
} | |
vsync_res = SDL_GL_GetSwapInterval() != 0; | |
diff --git a/Engine/gfx/gfxdriverbase.cpp b/Engine/gfx/gfxdriverbase.cpp | |
index e52389f..1843cee 100644 | |
--- a/Engine/gfx/gfxdriverbase.cpp | |
+++ b/Engine/gfx/gfxdriverbase.cpp | |
@@ -11,6 +11,7 @@ | |
// http://www.opensource.org/licenses/artistic-license-2.0.php | |
// | |
//============================================================================= | |
+#include <debug/out.h> | |
#include "gfx/ali3dexception.h" | |
#include "gfx/bitmap.h" | |
#include "gfx/gfxfilter.h" | |
@@ -66,6 +67,7 @@ Rect GraphicsDriverBase::GetRenderDestination() const | |
bool GraphicsDriverBase::SetVsync(bool enabled) | |
{ | |
+ Debug::Printf(kDbgMsg_Info, "GraphicsDriverBase: SetVsync (%d) called, Vsync was=(%d)", enabled, _mode.Vsync); | |
if (!_capsVsync || (_mode.Vsync == enabled)) | |
{ | |
return _mode.Vsync; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment