aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Grois <andi@grois.info>2018-03-11 14:41:30 +0100
committerAndreas Grois <andi@grois.info>2018-03-11 14:41:30 +0100
commit7a8c83a1ee3215b1bc54d436cde05682e6188cf1 (patch)
treefaabe5e224a9aa84ec312b4a50fe692c02ad4978
parentac16f6660983c143918b2a1133db5954a4e3ba31 (diff)
Disable vsync. Not needed, and causing the rendering to be slower than
necessary.
-rw-r--r--BuddhaTest/src/BuddhaTest.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/BuddhaTest/src/BuddhaTest.cpp b/BuddhaTest/src/BuddhaTest.cpp
index b9629bf..37843c6 100644
--- a/BuddhaTest/src/BuddhaTest.cpp
+++ b/BuddhaTest/src/BuddhaTest.cpp
@@ -53,6 +53,9 @@ int main(int argc, char * argv[])
glfwMakeContextCurrent(window);
gladLoadGLLoader((GLADloadproc)glfwGetProcAddress);
+ //disable vsync
+ glfwSwapInterval(0);
+
//we have a context. Let's check if input is sane.
//calcualte buffer size, and make sure it's allowed by the driver.
const unsigned int pixelCount{(settings.imageWidth * bufferHeight)*3}; //*3 -> RGB