diff --git a/cmake/macros/AutoScribeShader.cmake b/cmake/macros/AutoScribeShader.cmake index 6dc4899d29..29a53e7737 100755 --- a/cmake/macros/AutoScribeShader.cmake +++ b/cmake/macros/AutoScribeShader.cmake @@ -46,6 +46,9 @@ function(AUTOSCRIBE_SHADER SHADER_FILE) set(SHADER_TARGET ${SHADER_TARGET}_frag.h) endif() + # Put shaders in an isolated place + set(SHADER_TARGET "shaders/${TARGET_NAME}/${SHADER_TARGET}") + # Target dependant Custom rule on the SHADER_FILE if (APPLE) set(GLPROFILE MAC_GL) @@ -105,4 +108,7 @@ macro(AUTOSCRIBE_SHADER_LIB) list(APPEND AUTOSCRIBE_SHADER_LIB_SRC ${SHADER_SOURCE_FILES}) list(APPEND AUTOSCRIBE_SHADER_LIB_SRC ${AUTOSCRIBE_SHADER_SRC}) + # Link library shaders, if they exist + include_directories("${CMAKE_CURRENT_BINARY_DIR}/shaders/${TARGET_NAME}") + endmacro() diff --git a/cmake/macros/LinkHifiLibraries.cmake b/cmake/macros/LinkHifiLibraries.cmake index ed37256b10..3767dc7131 100644 --- a/cmake/macros/LinkHifiLibraries.cmake +++ b/cmake/macros/LinkHifiLibraries.cmake @@ -19,20 +19,14 @@ macro(LINK_HIFI_LIBRARIES) endif () include_directories("${HIFI_LIBRARY_DIR}/${HIFI_LIBRARY}/src") + include_directories("${CMAKE_BINARY_DIR}/libraries/${HIFI_LIBRARY}/shaders") add_dependencies(${TARGET_NAME} ${HIFI_LIBRARY}) # link the actual library - it is static so don't bubble it up target_link_libraries(${TARGET_NAME} ${HIFI_LIBRARY}) - - # ask the library what its include dependencies are and link them - get_target_property(LINKED_TARGET_DEPENDENCY_INCLUDES ${HIFI_LIBRARY} DEPENDENCY_INCLUDES) - - if(LINKED_TARGET_DEPENDENCY_INCLUDES) - list(APPEND ${TARGET_NAME}_DEPENDENCY_INCLUDES ${LINKED_TARGET_DEPENDENCY_INCLUDES}) - endif() endforeach() setup_memory_debugger() -endmacro(LINK_HIFI_LIBRARIES) \ No newline at end of file +endmacro(LINK_HIFI_LIBRARIES) diff --git a/interface/src/Stars.cpp b/interface/src/Stars.cpp index 3305cc4f3b..a0283f0efd 100644 --- a/interface/src/Stars.cpp +++ b/interface/src/Stars.cpp @@ -22,11 +22,11 @@ #include #include -#include -#include +#include +#include -#include -#include +#include +#include //static const float TILT = 0.23f; static const float TILT = 0.0f; diff --git a/libraries/entities-renderer/src/RenderableBoxEntityItem.cpp b/libraries/entities-renderer/src/RenderableBoxEntityItem.cpp index 671043813e..e53b77a4dc 100644 --- a/libraries/entities-renderer/src/RenderableBoxEntityItem.cpp +++ b/libraries/entities-renderer/src/RenderableBoxEntityItem.cpp @@ -19,8 +19,8 @@ #include #include -#include "../render-utils/simple_vert.h" -#include "../render-utils/simple_frag.h" +#include +#include EntityItemPointer RenderableBoxEntityItem::factory(const EntityItemID& entityID, const EntityItemProperties& properties) { EntityItemPointer entity{ new RenderableBoxEntityItem(entityID) }; diff --git a/libraries/entities-renderer/src/RenderableSphereEntityItem.cpp b/libraries/entities-renderer/src/RenderableSphereEntityItem.cpp index b5867fb1ee..135e29cc48 100644 --- a/libraries/entities-renderer/src/RenderableSphereEntityItem.cpp +++ b/libraries/entities-renderer/src/RenderableSphereEntityItem.cpp @@ -19,8 +19,8 @@ #include #include -#include "../render-utils/simple_vert.h" -#include "../render-utils/simple_frag.h" +#include +#include // Sphere entities should fit inside a cube entity of the same size, so a sphere that has dimensions 1x1x1 // is a half unit sphere. However, the geometry cache renders a UNIT sphere, so we need to scale down. diff --git a/tests/shaders/src/main.cpp b/tests/shaders/src/main.cpp index ddc7ad6540..82c5583f53 100644 --- a/tests/shaders/src/main.cpp +++ b/tests/shaders/src/main.cpp @@ -23,83 +23,77 @@ #include #include -#include "../model/Skybox_vert.h" -#include "../model/Skybox_frag.h" +#include +#include +#include +#include -#include "simple_vert.h" -#include "simple_frag.h" -#include "simple_textured_frag.h" -#include "simple_textured_emisive_frag.h" +#include +#include -#include "deferred_light_vert.h" -#include "deferred_light_limited_vert.h" +#include +#include +#include -#include "directional_light_frag.h" +#include +#include -#include "directional_ambient_light_frag.h" +#include +#include -#include "directional_skybox_light_frag.h" +#include +#include +#include +#include +#include +#include +#include +#include -#include "point_light_frag.h" -#include "spot_light_frag.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include -#include "standardTransformPNTC_vert.h" -#include "standardDrawTexture_frag.h" +#include +#include +#include +#include -#include "model_vert.h" -#include "model_shadow_vert.h" -#include "model_normal_map_vert.h" -#include "model_lightmap_vert.h" -#include "model_lightmap_normal_map_vert.h" -#include "skin_model_vert.h" -#include "skin_model_shadow_vert.h" -#include "skin_model_normal_map_vert.h" +#include +#include -#include "model_frag.h" -#include "model_shadow_frag.h" -#include "model_normal_map_frag.h" -#include "model_normal_specular_map_frag.h" -#include "model_specular_map_frag.h" -#include "model_lightmap_frag.h" -#include "model_lightmap_normal_map_frag.h" -#include "model_lightmap_normal_specular_map_frag.h" -#include "model_lightmap_specular_map_frag.h" -#include "model_translucent_frag.h" +#include +#include -#include "untextured_particle_frag.h" -#include "untextured_particle_vert.h" -#include "textured_particle_frag.h" -#include "textured_particle_vert.h" +#include +#include +#include +#include +#include -#include "hit_effect_vert.h" -#include "hit_effect_frag.h" +#include +#include +#include +#include +#include +#include -#include "overlay3D_vert.h" -#include "overlay3D_frag.h" +#include +#include -#include "Skybox_vert.h" -#include "Skybox_frag.h" +#include +#include -#include "stars_vert.h" -#include "stars_frag.h" -#include "starsGrid_frag.h" - -#include "DrawTransformUnitQuad_vert.h" -#include "DrawTexcoordRectTransformUnitQuad_vert.h" -#include "DrawViewportQuadTransformTexcoord_vert.h" -#include "DrawTexture_frag.h" -#include "DrawTextureOpaque_frag.h" -#include "DrawColoredTexture_frag.h" - -#include "sdf_text3D_vert.h" -#include "sdf_text3D_frag.h" - -#include "paintStroke_vert.h" -#include "paintStroke_frag.h" - -#include "polyvox_vert.h" -#include "polyvox_frag.h" +#include +#include // Create a simple OpenGL window that renders text in various ways class QTestWindow : public QWindow {