Revert "Remove usage of QOpenGLFunctions and use GLEW instead."

This reverts commit 464d713c2a.
This commit is contained in:
David Williams
2014-03-25 21:44:01 +01:00
parent 464d713c2a
commit 1f1cc67fb7
3 changed files with 49 additions and 43 deletions

View File

@ -32,17 +32,13 @@ SET(INC_FILES
OpenGLWidget.h
)
add_definitions(-DGLEW_STATIC)
#"Sources" and "Headers" are the group names in Visual Studio.
#They may have other uses too...
SOURCE_GROUP("Sources" FILES ${SRC_FILES})
SOURCE_GROUP("Headers" FILES ${INC_FILES})
FIND_PACKAGE(OpenGL REQUIRED)
#Tell CMake the paths for OpenGL and for PolyVox (which is just relative to our current location)
INCLUDE_DIRECTORIES(${PolyVoxCore_BINARY_DIR}/include ${PolyVoxCore_SOURCE_DIR}/include ${GLEW_SOURCE_DIR})
INCLUDE_DIRECTORIES(${PolyVoxCore_BINARY_DIR}/include ${PolyVoxCore_SOURCE_DIR}/include)
LINK_DIRECTORIES(${PolyVoxCore_BINARY_DIR})
#Build
@ -50,7 +46,7 @@ ADD_EXECUTABLE(BasicExample ${SRC_FILES})
IF(MSVC)
SET_TARGET_PROPERTIES(BasicExample PROPERTIES COMPILE_FLAGS "/W4 /wd4127")
ENDIF(MSVC)
TARGET_LINK_LIBRARIES(BasicExample glew Qt5::OpenGL ${OPENGL_gl_LIBRARY} PolyVoxCore)
TARGET_LINK_LIBRARIES(BasicExample Qt5::OpenGL PolyVoxCore)
SET_PROPERTY(TARGET BasicExample PROPERTY FOLDER "Examples")
#Install - Only install the example in Windows