Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand All @@ -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)
Expand Down
7 changes: 3 additions & 4 deletions SimpleNGL.pro
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion shaders/PhongFragment.glsl
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion shaders/PhongVertex.glsl
Original file line number Diff line number Diff line change
@@ -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
Expand Down