Skip to content

Commit 2cae8e6

Browse files
committed
chore: disable vsync and remove notification messages logging
1 parent e814f2a commit 2cae8e6

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/common/application.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,8 @@ int our::Application::run(int run_for_frames) {
230230

231231
gladLoadGL(glfwGetProcAddress); // Load the OpenGL functions from the driver
232232

233+
glfwSwapInterval(0); // Disable V-Sync
234+
233235
// Print information about the OpenGL context
234236
std::cout << "VENDOR : " << glGetString(GL_VENDOR) << std::endl;
235237
std::cout << "RENDERER : " << glGetString(GL_RENDERER) << std::endl;
@@ -245,6 +247,9 @@ int our::Application::run(int run_for_frames) {
245247
// This will make sure that OpenGL and the main thread are synchronized such that message callback is called as soon
246248
// as the command causing it is called. This is useful for debugging but slows down the code execution.
247249
glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS);
250+
251+
// Disable ALL messages with severity of "notification"
252+
glDebugMessageControl(GL_DONT_CARE, GL_DONT_CARE, GL_DEBUG_SEVERITY_NOTIFICATION, 0, nullptr, GL_FALSE);
248253
#endif
249254

250255
setupCallbacks();

0 commit comments

Comments
 (0)