Move shader code to external files rather than embedded

A bit of CMake code in each example copies the files to the
correct location and Qt loads them from the application's binary
directory.
This commit is contained in:
Matt Williams
2014-05-27 15:08:20 +01:00
parent 1d8fc25cb7
commit 140cbc0fc7
7 changed files with 54 additions and 43 deletions

View File

@ -57,6 +57,9 @@ ENDIF(MSVC)
TARGET_LINK_LIBRARIES(OpenGLExample glew ${QT_LIBRARIES} ${OPENGL_gl_LIBRARY} ${OPENGL_glu_LIBRARY} PolyVoxCore)
SET_PROPERTY(TARGET OpenGLExample PROPERTY FOLDER "Examples")
configure_file(../common/example.vert example.vert COPYONLY)
configure_file(../common/example.frag example.frag COPYONLY)
#Install - Only install the example in Windows
IF(WIN32)
INSTALL(TARGETS OpenGLExample