summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorJason Maskell <Jason Maskell>2016-08-01 12:10:17 +0700
committerJason Maskell <Jason Maskell>2016-08-01 12:10:17 +0700
commit4f696cb8b1ee6fe6056017272ede68e38abb0564 (patch)
treed8cdb963e00bc8ef60d047c2e647eece6eeaa0bb /compiler
parentDon't need FindDirectX anymore, so deleted it and modified the cmake files. (diff)
downloadwaveworks_archive-4f696cb8b1ee6fe6056017272ede68e38abb0564.tar.xz
waveworks_archive-4f696cb8b1ee6fe6056017272ede68e38abb0564.zip
Removed nvsf_ prefix from all shader variables.
Added manually generated glsl.h files for the OpenGL sample. Breaking DRY but no longer need sed and an external CL call to get glsl. Worth the tradeoff. OpenGL sample now compiles and runs but fails at runtime when loading a texture.
Diffstat (limited to 'compiler')
-rw-r--r--compiler/cmake/sample_opengl.cmake18
1 files changed, 14 insertions, 4 deletions
diff --git a/compiler/cmake/sample_opengl.cmake b/compiler/cmake/sample_opengl.cmake
index 6518c90..cac1150 100644
--- a/compiler/cmake/sample_opengl.cmake
+++ b/compiler/cmake/sample_opengl.cmake
@@ -3,14 +3,15 @@
#
-FIND_PACKAGE(AntTweakBar REQUIRED)
+FIND_PACKAGE(AntTweakBar 1.0 REQUIRED)
SET(SAMP_SOURCE_DIR ${PROJECT_SOURCE_DIR}/sample/opengl)
SET(TL_INCLUDE_DIR ${PROJECT_SOURCE_DIR}/include)
+SET(SHADER_DIR ${PROJECT_SOURCE_DIR}/src/shader)
IF(TARGET_BUILD_PLATFORM STREQUAL "Windows")
- FIND_PACKAGE(DirectX REQUIRED)
+# FIND_PACKAGE(DirectX REQUIRED)
SET(WW_PLATFORM_INCLUDES
)
@@ -79,16 +80,25 @@ SET(APP_FILES
${SAMP_SOURCE_DIR}/water.glsl
)
+SET(SHADER_H_FILES
+ ${SHADER_DIR}/CalcGradient_glsl_vs.h
+ ${SHADER_DIR}/CalcGradient_glsl_ps.h
+
+ ${SHADER_DIR}/FoamGeneration_glsl_vs.h
+ ${SHADER_DIR}/FoamGeneration_glsl_ps.h
+)
+
ADD_EXECUTABLE(SampleOpenGL WIN32
${WW_PLATFORM_SRC_FILES}
${APP_FILES}
-
+ ${SHADER_H_FILES}
)
-SOURCE_GROUP("app" FILES ${APP_FILES})
+SOURCE_GROUP("app" FILES ${APP_FILES})
+SOURCE_GROUP("glsl" FILES ${SHADER_H_FILES})
# Target specific compile options