diff --git a/CMakeLists.txt b/CMakeLists.txt index 412ea26..4f8b613 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,7 +23,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux") add_definitions(-DLINUX) - set ( PROJECT_LINK_LIBS -lNGL -lGL) + set ( PROJECT_LINK_LIBS -lNGL -lGL) endif() @@ -45,6 +45,7 @@ add_definitions(-O2 -D_FILE_OFFSET_BITS=64 -fPIC) # now add NGL specific values +#set ( PROJECT_LINK_LIBS -lNGL ) link_directories( $ENV{HOME}/NGL/lib ) # as NGL uses Qt we need to define that flag add_definitions(-DQT5BUILD) diff --git a/SimpleNGL.pro b/SimpleNGL.pro index d519c76..72128f1 100644 --- a/SimpleNGL.pro +++ b/SimpleNGL.pro @@ -4,6 +4,7 @@ TARGET=SimpleNGL OBJECTS_DIR=obj # core Qt Libs to use add more here if needed. QT+=gui opengl core + # as I want to support 4.8 and 5 this will set a flag for some of the mac stuff # mainly in the types.h file for the setMacVisual which is native in Qt5 isEqual(QT_MAJOR_VERSION, 5) { @@ -15,11 +16,9 @@ MOC_DIR=moc # on a mac we don't create a .app bundle file ( for ease of multiplatform use) CONFIG-=app_bundle # Auto include all .cpp files in the project src directory (can specifiy individually if required) -SOURCES+= $$PWD/src/NGLScene.cpp \ - $$PWD/src/main.cpp +SOURCES+= $$PWD/src/*.cpp # same for the .h files -HEADERS+= $$PWD/include/NGLScene.h \ - $$PWD/include/WindowParams.h +HEADERS+= $$PWD/include/*.h # and add the include dir into the search path for Qt and make INCLUDEPATH +=./include # where our exe is going to live (root of project) diff --git a/shaders/PhongFragment.glsl b/shaders/PhongFragment.glsl index 6ed342a..fb0603d 100644 --- a/shaders/PhongFragment.glsl +++ b/shaders/PhongFragment.glsl @@ -1,4 +1,4 @@ -#version 410 core +#version 330 core /// @brief our output fragment colour layout (location =0) out vec4 fragColour; /// @brief[in] the vertex normal diff --git a/shaders/PhongVertex.glsl b/shaders/PhongVertex.glsl index fba3bd3..ce76b9a 100644 --- a/shaders/PhongVertex.glsl +++ b/shaders/PhongVertex.glsl @@ -1,4 +1,4 @@ -#version 410 core +#version 330 core /// @brief the vertex passed in layout (location = 0) in vec3 inVert; /// @brief the normal passed in