From 7399aedfdd2097d8906dfc1760f8110ca257bd2e Mon Sep 17 00:00:00 2001 From: Syoyo Fujita Date: Tue, 19 Apr 2016 20:34:51 +0900 Subject: [PATCH] Initial support of linux for viewer example. --- examples/viewer/Makefile | 10 ++++++++-- examples/viewer/viewer.cc | 2 ++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/examples/viewer/Makefile b/examples/viewer/Makefile index e5204fc..9c1f621 100644 --- a/examples/viewer/Makefile +++ b/examples/viewer/Makefile @@ -1,6 +1,12 @@ GLFW_INC=-I/usr/local/include -GLFW_LIBS=-L/usr/local/lib -lglfw3 -lglew -GL_LIBS=-framework OpenGL + +# OSX +#GLFW_LIBS=-L/usr/local/lib -lglfw3 -lGLEW +#GL_LIBS=-framework OpenGL + +# Linux +GLFW_LIBS=-L/usr/local/lib -lglfw3 -lGLEW +GL_LIBS=-lGL -lGLU -lX11 -lXrandr -lXi -lXxf86vm -lXcursor -lXinerama -ldl -pthread CXX_FLAGS=-Wno-deprecated-declarations diff --git a/examples/viewer/viewer.cc b/examples/viewer/viewer.cc index d89fadc..2022168 100644 --- a/examples/viewer/viewer.cc +++ b/examples/viewer/viewer.cc @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -345,6 +346,7 @@ int main(int argc, char **argv) } glfwMakeContextCurrent(window); + glfwSwapInterval(1); // Callback glfwSetWindowSizeCallback(window, reshapeFunc);