From 08ccda9cfcc33cbd015ec501aac05a95cf2f5f20 Mon Sep 17 00:00:00 2001 From: humbletim Date: Tue, 16 Jan 2018 12:44:44 -0500 Subject: [PATCH 1/2] rename libraries/model(src/model) -> libraries/graphics(src/graphics) --- android/app/CMakeLists.txt | 2 +- assignment-client/CMakeLists.txt | 2 +- interface/CMakeLists.txt | 2 +- interface/src/Application.h | 2 +- libraries/animation/CMakeLists.txt | 2 +- libraries/avatars-renderer/CMakeLists.txt | 4 ++-- libraries/baking/CMakeLists.txt | 2 +- libraries/display-plugins/CMakeLists.txt | 2 +- libraries/entities-renderer/CMakeLists.txt | 4 ++-- .../entities-renderer/src/RenderablePolyVoxEntityItem.cpp | 2 +- .../entities-renderer/src/RenderablePolyVoxEntityItem.h | 4 ++-- .../entities-renderer/src/RenderableZoneEntityItem.cpp | 2 +- libraries/entities-renderer/src/RenderableZoneEntityItem.h | 6 +++--- libraries/entities-renderer/src/polyvox.slf | 2 +- libraries/entities-renderer/src/polyvox_fade.slf | 2 +- libraries/entities/CMakeLists.txt | 2 +- libraries/fbx/CMakeLists.txt | 2 +- libraries/fbx/src/FBX.h | 4 ++-- libraries/fbx/src/FBXReader.h | 4 ++-- libraries/fbx/src/OBJWriter.cpp | 2 +- libraries/fbx/src/OBJWriter.h | 2 +- libraries/{model => graphics}/CMakeLists.txt | 4 ++-- .../{model/src/model => graphics/src/graphics}/Asset.cpp | 2 +- .../{model/src/model => graphics/src/graphics}/Asset.h | 2 +- .../{model/src/model => graphics/src/graphics}/Forward.h | 2 +- .../{model/src/model => graphics/src/graphics}/Geometry.cpp | 2 +- .../{model/src/model => graphics/src/graphics}/Geometry.h | 2 +- .../src/graphics/GraphicsLogging.cpp} | 4 ++-- .../src/graphics/GraphicsLogging.h} | 4 ++-- .../{model/src/model => graphics/src/graphics}/Haze.cpp | 2 +- libraries/{model/src/model => graphics/src/graphics}/Haze.h | 2 +- .../{model/src/model => graphics/src/graphics}/Light.cpp | 2 +- .../{model/src/model => graphics/src/graphics}/Light.h | 2 +- .../{model/src/model => graphics/src/graphics}/Light.slh | 6 +++--- .../src/graphics}/LightIrradiance.shared.slh | 0 .../model => graphics/src/graphics}/LightVolume.shared.slh | 2 +- .../{model/src/model => graphics/src/graphics}/Material.cpp | 2 +- .../{model/src/model => graphics/src/graphics}/Material.h | 2 +- .../{model/src/model => graphics/src/graphics}/Material.slh | 0 .../{model/src/model => graphics/src/graphics}/Skybox.cpp | 2 +- .../{model/src/model => graphics/src/graphics}/Skybox.h | 2 +- .../src/graphics}/SphericalHarmonics.shared.slh | 2 +- .../{model/src/model => graphics/src/graphics}/Stage.cpp | 2 +- .../{model/src/model => graphics/src/graphics}/Stage.h | 2 +- .../src/model => graphics/src/graphics}/TextureMap.cpp | 2 +- .../{model/src/model => graphics/src/graphics}/TextureMap.h | 2 +- .../{model/src/model => graphics/src/graphics}/skybox.slf | 0 .../{model/src/model => graphics/src/graphics}/skybox.slv | 0 libraries/model-networking/CMakeLists.txt | 2 +- .../model-networking/src/model-networking/ModelCache.h | 4 ++-- .../src/model-networking/SimpleMeshProxy.cpp | 2 +- .../model-networking/src/model-networking/TextureCache.h | 2 +- libraries/physics/CMakeLists.txt | 2 +- libraries/physics/src/CollisionRenderMeshCache.h | 2 +- libraries/procedural/CMakeLists.txt | 4 ++-- libraries/procedural/src/procedural/ProceduralSkybox.cpp | 4 ++-- libraries/procedural/src/procedural/ProceduralSkybox.h | 2 +- libraries/render-utils/CMakeLists.txt | 4 ++-- libraries/render-utils/src/BackgroundStage.h | 2 +- libraries/render-utils/src/DeferredGlobalLight.slh | 2 +- libraries/render-utils/src/DeferredLightingEffect.h | 4 ++-- libraries/render-utils/src/DrawHaze.h | 2 +- libraries/render-utils/src/ForwardGlobalLight.slh | 2 +- libraries/render-utils/src/GeometryCache.cpp | 2 +- libraries/render-utils/src/GeometryCache.h | 4 ++-- libraries/render-utils/src/Haze.slf | 2 +- libraries/render-utils/src/HazeStage.h | 4 ++-- libraries/render-utils/src/LightPayload.h | 2 +- libraries/render-utils/src/LightStage.h | 2 +- libraries/render-utils/src/MeshPartPayload.h | 2 +- libraries/render-utils/src/StencilMaskPass.cpp | 2 +- libraries/render-utils/src/StencilMaskPass.h | 2 +- libraries/render-utils/src/deferred_light_point.slv | 2 +- libraries/render-utils/src/deferred_light_spot.slv | 2 +- libraries/render-utils/src/forward_model.slf | 2 +- libraries/render-utils/src/forward_model_normal_map.slf | 2 +- .../render-utils/src/forward_model_normal_specular_map.slf | 2 +- libraries/render-utils/src/forward_model_specular_map.slf | 2 +- libraries/render-utils/src/forward_model_translucent.slf | 2 +- libraries/render-utils/src/forward_model_unlit.slf | 2 +- .../render-utils/src/lightClusters_drawClusterContent.slf | 2 +- libraries/render-utils/src/local_lights_drawOutline.slf | 2 +- libraries/render-utils/src/local_lights_shading.slf | 2 +- libraries/render-utils/src/model.slf | 2 +- libraries/render-utils/src/model_fade.slf | 2 +- libraries/render-utils/src/model_lightmap.slf | 2 +- libraries/render-utils/src/model_lightmap_fade.slf | 2 +- libraries/render-utils/src/model_lightmap_normal_map.slf | 2 +- .../render-utils/src/model_lightmap_normal_map_fade.slf | 2 +- .../render-utils/src/model_lightmap_normal_specular_map.slf | 2 +- .../src/model_lightmap_normal_specular_map_fade.slf | 2 +- libraries/render-utils/src/model_lightmap_specular_map.slf | 2 +- .../render-utils/src/model_lightmap_specular_map_fade.slf | 2 +- libraries/render-utils/src/model_normal_map.slf | 2 +- libraries/render-utils/src/model_normal_map_fade.slf | 2 +- libraries/render-utils/src/model_normal_specular_map.slf | 2 +- .../render-utils/src/model_normal_specular_map_fade.slf | 2 +- libraries/render-utils/src/model_specular_map.slf | 2 +- libraries/render-utils/src/model_specular_map_fade.slf | 2 +- libraries/render-utils/src/model_translucent.slf | 2 +- libraries/render-utils/src/model_translucent_fade.slf | 2 +- libraries/render-utils/src/model_translucent_unlit.slf | 2 +- libraries/render-utils/src/model_translucent_unlit_fade.slf | 2 +- libraries/render-utils/src/model_unlit.slf | 2 +- libraries/render-utils/src/model_unlit_fade.slf | 2 +- libraries/render-utils/src/overlay3D.slf | 2 +- libraries/render-utils/src/overlay3D_model.slf | 2 +- libraries/render-utils/src/overlay3D_model_translucent.slf | 2 +- .../render-utils/src/overlay3D_model_translucent_unlit.slf | 2 +- libraries/render-utils/src/overlay3D_model_unlit.slf | 2 +- libraries/render-utils/src/overlay3D_translucent.slf | 2 +- libraries/render-utils/src/simple.slf | 2 +- libraries/render-utils/src/simple_fade.slf | 2 +- libraries/render-utils/src/simple_textured.slf | 2 +- libraries/render-utils/src/simple_textured_fade.slf | 2 +- .../src/subsurfaceScattering_drawScattering.slf | 2 +- libraries/render-utils/src/zone_drawAmbient.slf | 2 +- libraries/render-utils/src/zone_drawKeyLight.slf | 2 +- libraries/render/CMakeLists.txt | 4 ++-- libraries/render/src/render/Item.h | 2 +- libraries/script-engine/CMakeLists.txt | 2 +- libraries/script-engine/src/SceneScriptingInterface.h | 2 +- plugins/openvr/CMakeLists.txt | 2 +- plugins/openvr/src/ViveControllerManager.h | 2 +- tests/animation/CMakeLists.txt | 2 +- tests/entities/CMakeLists.txt | 2 +- tests/gpu-test/CMakeLists.txt | 4 ++-- tests/octree/CMakeLists.txt | 2 +- tests/physics/CMakeLists.txt | 2 +- tests/render-perf/CMakeLists.txt | 2 +- tests/render-perf/src/main.cpp | 2 +- tests/render-texture-load/CMakeLists.txt | 2 +- tests/shaders/CMakeLists.txt | 4 ++-- tests/shaders/src/main.cpp | 4 ++-- tools/oven/CMakeLists.txt | 2 +- tools/skeleton-dump/CMakeLists.txt | 2 +- tools/vhacd-util/CMakeLists.txt | 2 +- 137 files changed, 156 insertions(+), 156 deletions(-) rename libraries/{model => graphics}/CMakeLists.txt (50%) rename libraries/{model/src/model => graphics/src/graphics}/Asset.cpp (90%) rename libraries/{model/src/model => graphics/src/graphics}/Asset.h (98%) rename libraries/{model/src/model => graphics/src/graphics}/Forward.h (92%) rename libraries/{model/src/model => graphics/src/graphics}/Geometry.cpp (99%) rename libraries/{model/src/model => graphics/src/graphics}/Geometry.h (99%) rename libraries/{model/src/model/ModelLogging.cpp => graphics/src/graphics/GraphicsLogging.cpp} (75%) rename libraries/{model/src/model/ModelLogging.h => graphics/src/graphics/GraphicsLogging.h} (81%) rename libraries/{model/src/model => graphics/src/graphics}/Haze.cpp (99%) rename libraries/{model/src/model => graphics/src/graphics}/Haze.h (99%) rename libraries/{model/src/model => graphics/src/graphics}/Light.cpp (99%) rename libraries/{model/src/model => graphics/src/graphics}/Light.h (99%) rename libraries/{model/src/model => graphics/src/graphics}/Light.slh (93%) rename libraries/{model/src/model => graphics/src/graphics}/LightIrradiance.shared.slh (100%) rename libraries/{model/src/model => graphics/src/graphics}/LightVolume.shared.slh (98%) rename libraries/{model/src/model => graphics/src/graphics}/Material.cpp (99%) rename libraries/{model/src/model => graphics/src/graphics}/Material.h (99%) rename libraries/{model/src/model => graphics/src/graphics}/Material.slh (100%) rename libraries/{model/src/model => graphics/src/graphics}/Skybox.cpp (99%) rename libraries/{model/src/model => graphics/src/graphics}/Skybox.h (97%) rename libraries/{model/src/model => graphics/src/graphics}/SphericalHarmonics.shared.slh (97%) rename libraries/{model/src/model => graphics/src/graphics}/Stage.cpp (99%) rename libraries/{model/src/model => graphics/src/graphics}/Stage.h (99%) rename libraries/{model/src/model => graphics/src/graphics}/TextureMap.cpp (96%) rename libraries/{model/src/model => graphics/src/graphics}/TextureMap.h (97%) rename libraries/{model/src/model => graphics/src/graphics}/skybox.slf (100%) rename libraries/{model/src/model => graphics/src/graphics}/skybox.slv (100%) diff --git a/android/app/CMakeLists.txt b/android/app/CMakeLists.txt index 4411b7b1bb..5682611151 100644 --- a/android/app/CMakeLists.txt +++ b/android/app/CMakeLists.txt @@ -11,7 +11,7 @@ link_hifi_libraries( physics audio audio-client ui midi controllers pointers - model model-networking fbx animation + graphics model-networking fbx animation entities entities-renderer avatars avatars-renderer ui-plugins input-plugins diff --git a/assignment-client/CMakeLists.txt b/assignment-client/CMakeLists.txt index e657587a7a..acdc1cbc53 100644 --- a/assignment-client/CMakeLists.txt +++ b/assignment-client/CMakeLists.txt @@ -11,7 +11,7 @@ setup_memory_debugger() # link in the shared libraries link_hifi_libraries( - audio avatars octree gpu model fbx entities + audio avatars octree gpu graphics fbx entities networking animation recording shared script-engine embedded-webserver controllers physics plugins midi image ) diff --git a/interface/CMakeLists.txt b/interface/CMakeLists.txt index 6b78826d75..21225756b4 100644 --- a/interface/CMakeLists.txt +++ b/interface/CMakeLists.txt @@ -201,7 +201,7 @@ endif() # link required hifi libraries link_hifi_libraries( - shared octree ktx gpu gl procedural model render + shared octree ktx gpu gl procedural graphics render pointers recording fbx networking model-networking entities avatars trackers audio audio-client animation script-engine physics diff --git a/interface/src/Application.h b/interface/src/Application.h index effb35caee..6b70e88b89 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -71,7 +71,7 @@ #include "UndoStackScriptingInterface.h" #include -#include +#include #include #include "FrameTimingsScriptingInterface.h" diff --git a/libraries/animation/CMakeLists.txt b/libraries/animation/CMakeLists.txt index b9fef19fbb..1ec6194afd 100644 --- a/libraries/animation/CMakeLists.txt +++ b/libraries/animation/CMakeLists.txt @@ -1,6 +1,6 @@ set(TARGET_NAME animation) setup_hifi_library(Network Script) -link_hifi_libraries(shared model fbx) +link_hifi_libraries(shared graphics fbx) include_hifi_library_headers(networking) include_hifi_library_headers(gpu) diff --git a/libraries/avatars-renderer/CMakeLists.txt b/libraries/avatars-renderer/CMakeLists.txt index 148835965e..53edc692f2 100644 --- a/libraries/avatars-renderer/CMakeLists.txt +++ b/libraries/avatars-renderer/CMakeLists.txt @@ -1,7 +1,7 @@ set(TARGET_NAME avatars-renderer) -AUTOSCRIBE_SHADER_LIB(gpu model render render-utils) +AUTOSCRIBE_SHADER_LIB(gpu graphics render render-utils) setup_hifi_library(Widgets Network Script) -link_hifi_libraries(shared gpu model animation model-networking script-engine render render-utils image trackers entities-renderer) +link_hifi_libraries(shared gpu graphics animation model-networking script-engine render render-utils image trackers entities-renderer) include_hifi_library_headers(avatars) include_hifi_library_headers(networking) include_hifi_library_headers(fbx) diff --git a/libraries/baking/CMakeLists.txt b/libraries/baking/CMakeLists.txt index 66cf791776..ec7caf574b 100644 --- a/libraries/baking/CMakeLists.txt +++ b/libraries/baking/CMakeLists.txt @@ -1,7 +1,7 @@ set(TARGET_NAME baking) setup_hifi_library(Concurrent) -link_hifi_libraries(shared model networking ktx image fbx) +link_hifi_libraries(shared graphics networking ktx image fbx) include_hifi_library_headers(gpu) add_dependency_external_projects(draco) diff --git a/libraries/display-plugins/CMakeLists.txt b/libraries/display-plugins/CMakeLists.txt index 1fd855e6aa..1d9d42d579 100644 --- a/libraries/display-plugins/CMakeLists.txt +++ b/libraries/display-plugins/CMakeLists.txt @@ -5,7 +5,7 @@ link_hifi_libraries(shared plugins ui-plugins gl ui render-utils ${PLATFORM_GL_B include_hifi_library_headers(gpu) include_hifi_library_headers(model-networking) include_hifi_library_headers(networking) -include_hifi_library_headers(model) +include_hifi_library_headers(graphics) include_hifi_library_headers(fbx) include_hifi_library_headers(image) include_hifi_library_headers(ktx) diff --git a/libraries/entities-renderer/CMakeLists.txt b/libraries/entities-renderer/CMakeLists.txt index 19987197b8..ea75367e1e 100644 --- a/libraries/entities-renderer/CMakeLists.txt +++ b/libraries/entities-renderer/CMakeLists.txt @@ -1,7 +1,7 @@ set(TARGET_NAME entities-renderer) -AUTOSCRIBE_SHADER_LIB(gpu model procedural render render-utils) +AUTOSCRIBE_SHADER_LIB(gpu graphics procedural render render-utils) setup_hifi_library(Widgets Network Script) -link_hifi_libraries(shared gpu procedural model model-networking script-engine render render-utils image ui pointers) +link_hifi_libraries(shared gpu procedural graphics model-networking script-engine render render-utils image ui pointers) include_hifi_library_headers(networking) include_hifi_library_headers(gl) include_hifi_library_headers(ktx) diff --git a/libraries/entities-renderer/src/RenderablePolyVoxEntityItem.cpp b/libraries/entities-renderer/src/RenderablePolyVoxEntityItem.cpp index ad0202457e..365ba5189a 100644 --- a/libraries/entities-renderer/src/RenderablePolyVoxEntityItem.cpp +++ b/libraries/entities-renderer/src/RenderablePolyVoxEntityItem.cpp @@ -65,7 +65,7 @@ #pragma warning(pop) #endif -#include "model/Geometry.h" +#include "graphics/Geometry.h" #include "StencilMaskPass.h" diff --git a/libraries/entities-renderer/src/RenderablePolyVoxEntityItem.h b/libraries/entities-renderer/src/RenderablePolyVoxEntityItem.h index 6ac518f79b..8dbe1dd0f1 100644 --- a/libraries/entities-renderer/src/RenderablePolyVoxEntityItem.h +++ b/libraries/entities-renderer/src/RenderablePolyVoxEntityItem.h @@ -21,8 +21,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/libraries/entities-renderer/src/RenderableZoneEntityItem.cpp b/libraries/entities-renderer/src/RenderableZoneEntityItem.cpp index 3ecce5ec38..4161b65ead 100644 --- a/libraries/entities-renderer/src/RenderableZoneEntityItem.cpp +++ b/libraries/entities-renderer/src/RenderableZoneEntityItem.cpp @@ -13,7 +13,7 @@ #include -#include +#include #include #include diff --git a/libraries/entities-renderer/src/RenderableZoneEntityItem.h b/libraries/entities-renderer/src/RenderableZoneEntityItem.h index 3174f00f4f..e1f696ca89 100644 --- a/libraries/entities-renderer/src/RenderableZoneEntityItem.h +++ b/libraries/entities-renderer/src/RenderableZoneEntityItem.h @@ -13,9 +13,9 @@ #define hifi_RenderableZoneEntityItem_h #include -#include -#include -#include +#include +#include +#include #include #include #include diff --git a/libraries/entities-renderer/src/polyvox.slf b/libraries/entities-renderer/src/polyvox.slf index 56f6f31d71..50034db48c 100644 --- a/libraries/entities-renderer/src/polyvox.slf +++ b/libraries/entities-renderer/src/polyvox.slf @@ -11,7 +11,7 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // -<@include model/Material.slh@> +<@include graphics/Material.slh@> <@include DeferredBufferWrite.slh@> in vec3 _normal; diff --git a/libraries/entities-renderer/src/polyvox_fade.slf b/libraries/entities-renderer/src/polyvox_fade.slf index 7af43be53f..4c179a15b6 100644 --- a/libraries/entities-renderer/src/polyvox_fade.slf +++ b/libraries/entities-renderer/src/polyvox_fade.slf @@ -11,7 +11,7 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // -<@include model/Material.slh@> +<@include graphics/Material.slh@> <@include DeferredBufferWrite.slh@> <@include Fade.slh@> diff --git a/libraries/entities/CMakeLists.txt b/libraries/entities/CMakeLists.txt index c23740654e..d6d9058e44 100644 --- a/libraries/entities/CMakeLists.txt +++ b/libraries/entities/CMakeLists.txt @@ -1,4 +1,4 @@ set(TARGET_NAME entities) setup_hifi_library(Network Script) include_directories(SYSTEM "${OPENSSL_INCLUDE_DIR}") -link_hifi_libraries(shared networking octree avatars model) +link_hifi_libraries(shared networking octree avatars graphics) diff --git a/libraries/fbx/CMakeLists.txt b/libraries/fbx/CMakeLists.txt index 683ddb52f7..e422af3629 100644 --- a/libraries/fbx/CMakeLists.txt +++ b/libraries/fbx/CMakeLists.txt @@ -1,7 +1,7 @@ set(TARGET_NAME fbx) setup_hifi_library() -link_hifi_libraries(shared model networking image) +link_hifi_libraries(shared graphics networking image) include_hifi_library_headers(gpu image) target_draco() diff --git a/libraries/fbx/src/FBX.h b/libraries/fbx/src/FBX.h index 50d40c35ac..21f8fe51aa 100644 --- a/libraries/fbx/src/FBX.h +++ b/libraries/fbx/src/FBX.h @@ -25,8 +25,8 @@ #include #include -#include -#include +#include +#include static const QByteArray FBX_BINARY_PROLOG = "Kaydara FBX Binary "; static const int FBX_HEADER_BYTES_BEFORE_VERSION = 23; diff --git a/libraries/fbx/src/FBXReader.h b/libraries/fbx/src/FBXReader.h index 34d63b098a..e446861627 100644 --- a/libraries/fbx/src/FBXReader.h +++ b/libraries/fbx/src/FBXReader.h @@ -27,8 +27,8 @@ #include #include -#include -#include +#include +#include class QIODevice; class FBXNode; diff --git a/libraries/fbx/src/OBJWriter.cpp b/libraries/fbx/src/OBJWriter.cpp index e0d3d36b06..42ef2be646 100644 --- a/libraries/fbx/src/OBJWriter.cpp +++ b/libraries/fbx/src/OBJWriter.cpp @@ -11,7 +11,7 @@ #include #include -#include "model/Geometry.h" +#include "graphics/Geometry.h" #include "OBJWriter.h" #include "ModelFormatLogging.h" diff --git a/libraries/fbx/src/OBJWriter.h b/libraries/fbx/src/OBJWriter.h index b6e20e1ae6..7f8b0ddbed 100644 --- a/libraries/fbx/src/OBJWriter.h +++ b/libraries/fbx/src/OBJWriter.h @@ -15,7 +15,7 @@ #include #include -#include +#include using MeshPointer = std::shared_ptr; diff --git a/libraries/model/CMakeLists.txt b/libraries/graphics/CMakeLists.txt similarity index 50% rename from libraries/model/CMakeLists.txt rename to libraries/graphics/CMakeLists.txt index da85b6aa3d..2b15604fdf 100755 --- a/libraries/model/CMakeLists.txt +++ b/libraries/graphics/CMakeLists.txt @@ -1,4 +1,4 @@ -set(TARGET_NAME model) -AUTOSCRIBE_SHADER_LIB(gpu model) +set(TARGET_NAME graphics) +AUTOSCRIBE_SHADER_LIB(gpu graphics) setup_hifi_library() link_hifi_libraries(shared ktx gpu image) \ No newline at end of file diff --git a/libraries/model/src/model/Asset.cpp b/libraries/graphics/src/graphics/Asset.cpp similarity index 90% rename from libraries/model/src/model/Asset.cpp rename to libraries/graphics/src/graphics/Asset.cpp index d839dad809..84d7560257 100644 --- a/libraries/model/src/model/Asset.cpp +++ b/libraries/graphics/src/graphics/Asset.cpp @@ -1,6 +1,6 @@ // // Asset.cpp -// libraries/model/src/model +// libraries/graphics/src/graphics // // Created by Sam Gateau on 08/21/2015. // Copyright 2015 High Fidelity, Inc. diff --git a/libraries/model/src/model/Asset.h b/libraries/graphics/src/graphics/Asset.h similarity index 98% rename from libraries/model/src/model/Asset.h rename to libraries/graphics/src/graphics/Asset.h index 51fc177538..c2e4ff3d3a 100644 --- a/libraries/model/src/model/Asset.h +++ b/libraries/graphics/src/graphics/Asset.h @@ -1,6 +1,6 @@ // // Asset.h -// libraries/model/src/model +// libraries/graphics/src/graphics // // Created by Sam Gateau on 08/21/2015. // Copyright 2015 High Fidelity, Inc. diff --git a/libraries/model/src/model/Forward.h b/libraries/graphics/src/graphics/Forward.h similarity index 92% rename from libraries/model/src/model/Forward.h rename to libraries/graphics/src/graphics/Forward.h index 90f55fa64f..7f728b44fc 100644 --- a/libraries/model/src/model/Forward.h +++ b/libraries/graphics/src/graphics/Forward.h @@ -1,6 +1,6 @@ // // Forward.h -// libraries/model/src/model +// libraries/graphics/src/graphics // // Created by Bradley Austin Davis on 2017/06/21 // Copyright 2013-2017 High Fidelity, Inc. diff --git a/libraries/model/src/model/Geometry.cpp b/libraries/graphics/src/graphics/Geometry.cpp similarity index 99% rename from libraries/model/src/model/Geometry.cpp rename to libraries/graphics/src/graphics/Geometry.cpp index 210b4ae8f3..930449c5e6 100755 --- a/libraries/model/src/model/Geometry.cpp +++ b/libraries/graphics/src/graphics/Geometry.cpp @@ -1,6 +1,6 @@ // // Geometry.cpp -// libraries/model/src/model +// libraries/graphics/src/graphics // // Created by Sam Gateau on 12/5/2014. // Copyright 2014 High Fidelity, Inc. diff --git a/libraries/model/src/model/Geometry.h b/libraries/graphics/src/graphics/Geometry.h similarity index 99% rename from libraries/model/src/model/Geometry.h rename to libraries/graphics/src/graphics/Geometry.h index 260de313ab..510cf54742 100755 --- a/libraries/model/src/model/Geometry.h +++ b/libraries/graphics/src/graphics/Geometry.h @@ -1,6 +1,6 @@ // // Geometry.h -// libraries/model/src/model +// libraries/graphics/src/graphics // // Created by Sam Gateau on 12/5/2014. // Copyright 2014 High Fidelity, Inc. diff --git a/libraries/model/src/model/ModelLogging.cpp b/libraries/graphics/src/graphics/GraphicsLogging.cpp similarity index 75% rename from libraries/model/src/model/ModelLogging.cpp rename to libraries/graphics/src/graphics/GraphicsLogging.cpp index 3b3fbed82c..9c46e89331 100644 --- a/libraries/model/src/model/ModelLogging.cpp +++ b/libraries/graphics/src/graphics/GraphicsLogging.cpp @@ -6,6 +6,6 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // -#include "ModelLogging.h" +#include "GraphicsLogging.h" -Q_LOGGING_CATEGORY(modelLog, "hifi.model") \ No newline at end of file +Q_LOGGING_CATEGORY(graphicsLog, "hifi.graphics") diff --git a/libraries/model/src/model/ModelLogging.h b/libraries/graphics/src/graphics/GraphicsLogging.h similarity index 81% rename from libraries/model/src/model/ModelLogging.h rename to libraries/graphics/src/graphics/GraphicsLogging.h index 33ed6fb059..29e3a7ffcd 100644 --- a/libraries/model/src/model/ModelLogging.h +++ b/libraries/graphics/src/graphics/GraphicsLogging.h @@ -1,5 +1,5 @@ // -// ModelLogging.h +// GraphicsLogging.h // hifi // // Created by Sam Gateau on 9/20/15. @@ -11,4 +11,4 @@ #include -Q_DECLARE_LOGGING_CATEGORY(modelLog) +Q_DECLARE_LOGGING_CATEGORY(graphicsLog) diff --git a/libraries/model/src/model/Haze.cpp b/libraries/graphics/src/graphics/Haze.cpp similarity index 99% rename from libraries/model/src/model/Haze.cpp rename to libraries/graphics/src/graphics/Haze.cpp index b56932e131..dd07afc6d6 100644 --- a/libraries/model/src/model/Haze.cpp +++ b/libraries/graphics/src/graphics/Haze.cpp @@ -1,6 +1,6 @@ // // Haze.cpp -// libraries/model/src/model +// libraries/graphics/src/graphics // // Created by Nissim Hadar on 9/13/2017. // Copyright 2014 High Fidelity, Inc. diff --git a/libraries/model/src/model/Haze.h b/libraries/graphics/src/graphics/Haze.h similarity index 99% rename from libraries/model/src/model/Haze.h rename to libraries/graphics/src/graphics/Haze.h index 2a575eb151..260f5f0097 100644 --- a/libraries/model/src/model/Haze.h +++ b/libraries/graphics/src/graphics/Haze.h @@ -1,6 +1,6 @@ // // MakeHaze.h -// libraries/model/src/model +// libraries/graphics/src/graphics // // Created by Nissim Hadar on 9/13/2017. // Copyright 2014 High Fidelity, Inc. diff --git a/libraries/model/src/model/Light.cpp b/libraries/graphics/src/graphics/Light.cpp similarity index 99% rename from libraries/model/src/model/Light.cpp rename to libraries/graphics/src/graphics/Light.cpp index 19da084f84..8b6aae7759 100755 --- a/libraries/model/src/model/Light.cpp +++ b/libraries/graphics/src/graphics/Light.cpp @@ -1,6 +1,6 @@ // // Light.cpp -// libraries/model/src/model +// libraries/graphics/src/graphics // // Created by Sam Gateau on 1/26/2014. // Copyright 2014 High Fidelity, Inc. diff --git a/libraries/model/src/model/Light.h b/libraries/graphics/src/graphics/Light.h similarity index 99% rename from libraries/model/src/model/Light.h rename to libraries/graphics/src/graphics/Light.h index 4c82eb5d77..58d5c0cf2a 100755 --- a/libraries/model/src/model/Light.h +++ b/libraries/graphics/src/graphics/Light.h @@ -1,6 +1,6 @@ // // Light.h -// libraries/model/src/model +// libraries/graphics/src/graphics // // Created by Sam Gateau on 12/10/2014. // Copyright 2014 High Fidelity, Inc. diff --git a/libraries/model/src/model/Light.slh b/libraries/graphics/src/graphics/Light.slh similarity index 93% rename from libraries/model/src/model/Light.slh rename to libraries/graphics/src/graphics/Light.slh index 093a87adc8..6b24f89c3c 100644 --- a/libraries/model/src/model/Light.slh +++ b/libraries/graphics/src/graphics/Light.slh @@ -11,8 +11,8 @@ <@if not MODEL_LIGHT_SLH@> <@def MODEL_LIGHT_SLH@> -<@include model/LightVolume.shared.slh@> -<@include model/LightIrradiance.shared.slh@> +<@include graphics/LightVolume.shared.slh@> +<@include graphics/LightIrradiance.shared.slh@> // NOw lets define Light struct Light { @@ -30,7 +30,7 @@ float getLightIntensity(Light l) { return lightIrradiance_getIntensity(l.irradia vec3 getLightIrradiance(Light l) { return lightIrradiance_getIrradiance(l.irradiance); } // AMbient lighting needs extra info provided from a different Buffer -<@include model/SphericalHarmonics.shared.slh@> +<@include graphics/SphericalHarmonics.shared.slh@> // Light Ambient struct LightAmbient { vec4 _ambient; diff --git a/libraries/model/src/model/LightIrradiance.shared.slh b/libraries/graphics/src/graphics/LightIrradiance.shared.slh similarity index 100% rename from libraries/model/src/model/LightIrradiance.shared.slh rename to libraries/graphics/src/graphics/LightIrradiance.shared.slh diff --git a/libraries/model/src/model/LightVolume.shared.slh b/libraries/graphics/src/graphics/LightVolume.shared.slh similarity index 98% rename from libraries/model/src/model/LightVolume.shared.slh rename to libraries/graphics/src/graphics/LightVolume.shared.slh index a78667ed6c..3f0cb135f5 100644 --- a/libraries/model/src/model/LightVolume.shared.slh +++ b/libraries/graphics/src/graphics/LightVolume.shared.slh @@ -3,7 +3,7 @@ #define LightVolume_Shared_slh // Light.shared.slh -// libraries/model/src/model +// libraries/graphics/src/graphics // // Created by Sam Gateau on 14/9/2016. // Copyright 2014 High Fidelity, Inc. diff --git a/libraries/model/src/model/Material.cpp b/libraries/graphics/src/graphics/Material.cpp similarity index 99% rename from libraries/model/src/model/Material.cpp rename to libraries/graphics/src/graphics/Material.cpp index 4e01c4b866..0cfb9916ac 100755 --- a/libraries/model/src/model/Material.cpp +++ b/libraries/graphics/src/graphics/Material.cpp @@ -1,6 +1,6 @@ // // Material.cpp -// libraries/model/src/model +// libraries/graphics/src/graphics // // Created by Sam Gateau on 12/10/2014. // Copyright 2014 High Fidelity, Inc. diff --git a/libraries/model/src/model/Material.h b/libraries/graphics/src/graphics/Material.h similarity index 99% rename from libraries/model/src/model/Material.h rename to libraries/graphics/src/graphics/Material.h index 8851ef4ce9..6a2b1c2bee 100755 --- a/libraries/model/src/model/Material.h +++ b/libraries/graphics/src/graphics/Material.h @@ -1,6 +1,6 @@ // // Material.h -// libraries/model/src/model +// libraries/graphics/src/graphics // // Created by Sam Gateau on 12/10/2014. // Copyright 2014 High Fidelity, Inc. diff --git a/libraries/model/src/model/Material.slh b/libraries/graphics/src/graphics/Material.slh similarity index 100% rename from libraries/model/src/model/Material.slh rename to libraries/graphics/src/graphics/Material.slh diff --git a/libraries/model/src/model/Skybox.cpp b/libraries/graphics/src/graphics/Skybox.cpp similarity index 99% rename from libraries/model/src/model/Skybox.cpp rename to libraries/graphics/src/graphics/Skybox.cpp index fd3061afa5..feb9fb86b7 100755 --- a/libraries/model/src/model/Skybox.cpp +++ b/libraries/graphics/src/graphics/Skybox.cpp @@ -1,6 +1,6 @@ // // Skybox.cpp -// libraries/model/src/model +// libraries/graphics/src/graphics // // Created by Sam Gateau on 5/4/2015. // Copyright 2015 High Fidelity, Inc. diff --git a/libraries/model/src/model/Skybox.h b/libraries/graphics/src/graphics/Skybox.h similarity index 97% rename from libraries/model/src/model/Skybox.h rename to libraries/graphics/src/graphics/Skybox.h index 90896fd8c6..99155bdd98 100755 --- a/libraries/model/src/model/Skybox.h +++ b/libraries/graphics/src/graphics/Skybox.h @@ -1,6 +1,6 @@ // // Skybox.h -// libraries/model/src/model +// libraries/graphics/src/graphics // // Created by Sam Gateau on 5/4/2015. // Copyright 2015 High Fidelity, Inc. diff --git a/libraries/model/src/model/SphericalHarmonics.shared.slh b/libraries/graphics/src/graphics/SphericalHarmonics.shared.slh similarity index 97% rename from libraries/model/src/model/SphericalHarmonics.shared.slh rename to libraries/graphics/src/graphics/SphericalHarmonics.shared.slh index 664c9e52db..312824c5a3 100644 --- a/libraries/model/src/model/SphericalHarmonics.shared.slh +++ b/libraries/graphics/src/graphics/SphericalHarmonics.shared.slh @@ -3,7 +3,7 @@ #define SphericalHarmonics_Shared_slh // SphericalHarmonics.shared.slh -// libraries/model/src/model +// libraries/graphics/src/graphics // // Created by Sam Gateau on 14/9/2016. // Copyright 2014 High Fidelity, Inc. diff --git a/libraries/model/src/model/Stage.cpp b/libraries/graphics/src/graphics/Stage.cpp similarity index 99% rename from libraries/model/src/model/Stage.cpp rename to libraries/graphics/src/graphics/Stage.cpp index 5854162cfa..3a300858fe 100644 --- a/libraries/model/src/model/Stage.cpp +++ b/libraries/graphics/src/graphics/Stage.cpp @@ -1,6 +1,6 @@ // // Stage.cpp -// libraries/model/src/model +// libraries/graphics/src/graphics // // Created by Sam Gateau on 2/24/2015. // Copyright 2014 High Fidelity, Inc. diff --git a/libraries/model/src/model/Stage.h b/libraries/graphics/src/graphics/Stage.h similarity index 99% rename from libraries/model/src/model/Stage.h rename to libraries/graphics/src/graphics/Stage.h index 5f48824568..65c7b016d6 100644 --- a/libraries/model/src/model/Stage.h +++ b/libraries/graphics/src/graphics/Stage.h @@ -1,6 +1,6 @@ // // Stage.h -// libraries/model/src/model +// libraries/graphics/src/graphics // // Created by Sam Gateau on 2/24/2015. // Copyright 2014 High Fidelity, Inc. diff --git a/libraries/model/src/model/TextureMap.cpp b/libraries/graphics/src/graphics/TextureMap.cpp similarity index 96% rename from libraries/model/src/model/TextureMap.cpp rename to libraries/graphics/src/graphics/TextureMap.cpp index b308dd72f8..7a4eb6391e 100755 --- a/libraries/model/src/model/TextureMap.cpp +++ b/libraries/graphics/src/graphics/TextureMap.cpp @@ -1,6 +1,6 @@ // // TextureMap.cpp -// libraries/model/src/model +// libraries/graphics/src/graphics // // Created by Sam Gateau on 5/6/2015. // Copyright 2014 High Fidelity, Inc. diff --git a/libraries/model/src/model/TextureMap.h b/libraries/graphics/src/graphics/TextureMap.h similarity index 97% rename from libraries/model/src/model/TextureMap.h rename to libraries/graphics/src/graphics/TextureMap.h index 1785d44730..268c3daef8 100755 --- a/libraries/model/src/model/TextureMap.h +++ b/libraries/graphics/src/graphics/TextureMap.h @@ -1,6 +1,6 @@ // // TextureMap.h -// libraries/model/src/model +// libraries/graphics/src/graphics // // Created by Sam Gateau on 5/6/2015. // Copyright 2014 High Fidelity, Inc. diff --git a/libraries/model/src/model/skybox.slf b/libraries/graphics/src/graphics/skybox.slf similarity index 100% rename from libraries/model/src/model/skybox.slf rename to libraries/graphics/src/graphics/skybox.slf diff --git a/libraries/model/src/model/skybox.slv b/libraries/graphics/src/graphics/skybox.slv similarity index 100% rename from libraries/model/src/model/skybox.slv rename to libraries/graphics/src/graphics/skybox.slv diff --git a/libraries/model-networking/CMakeLists.txt b/libraries/model-networking/CMakeLists.txt index db5563d7ea..696f4feb9a 100644 --- a/libraries/model-networking/CMakeLists.txt +++ b/libraries/model-networking/CMakeLists.txt @@ -1,4 +1,4 @@ set(TARGET_NAME model-networking) setup_hifi_library() -link_hifi_libraries(shared networking model fbx ktx image) +link_hifi_libraries(shared networking graphics fbx ktx image) include_hifi_library_headers(gpu) diff --git a/libraries/model-networking/src/model-networking/ModelCache.h b/libraries/model-networking/src/model-networking/ModelCache.h index a122e03eb9..5c49ec683a 100644 --- a/libraries/model-networking/src/model-networking/ModelCache.h +++ b/libraries/model-networking/src/model-networking/ModelCache.h @@ -15,8 +15,8 @@ #include #include -#include -#include +#include +#include #include "FBXReader.h" #include "TextureCache.h" diff --git a/libraries/model-networking/src/model-networking/SimpleMeshProxy.cpp b/libraries/model-networking/src/model-networking/SimpleMeshProxy.cpp index b44ea1ff56..741478789e 100644 --- a/libraries/model-networking/src/model-networking/SimpleMeshProxy.cpp +++ b/libraries/model-networking/src/model-networking/SimpleMeshProxy.cpp @@ -11,7 +11,7 @@ #include "SimpleMeshProxy.h" -#include +#include MeshPointer SimpleMeshProxy::getMeshPointer() const { return _mesh; diff --git a/libraries/model-networking/src/model-networking/TextureCache.h b/libraries/model-networking/src/model-networking/TextureCache.h index 5a96fcf5e6..742d003d02 100644 --- a/libraries/model-networking/src/model-networking/TextureCache.h +++ b/libraries/model-networking/src/model-networking/TextureCache.h @@ -21,7 +21,7 @@ #include #include -#include +#include #include #include diff --git a/libraries/physics/CMakeLists.txt b/libraries/physics/CMakeLists.txt index e219d3dbcd..ad082c1a6e 100644 --- a/libraries/physics/CMakeLists.txt +++ b/libraries/physics/CMakeLists.txt @@ -1,6 +1,6 @@ set(TARGET_NAME physics) setup_hifi_library() -link_hifi_libraries(shared fbx entities model) +link_hifi_libraries(shared fbx entities graphics) include_hifi_library_headers(networking) include_hifi_library_headers(gpu) include_hifi_library_headers(avatars) diff --git a/libraries/physics/src/CollisionRenderMeshCache.h b/libraries/physics/src/CollisionRenderMeshCache.h index 10b2440db2..64f161e229 100644 --- a/libraries/physics/src/CollisionRenderMeshCache.h +++ b/libraries/physics/src/CollisionRenderMeshCache.h @@ -16,7 +16,7 @@ #include #include -#include +#include class CollisionRenderMeshCache { diff --git a/libraries/procedural/CMakeLists.txt b/libraries/procedural/CMakeLists.txt index daf6fefccc..9ec7cb6431 100644 --- a/libraries/procedural/CMakeLists.txt +++ b/libraries/procedural/CMakeLists.txt @@ -1,5 +1,5 @@ set(TARGET_NAME procedural) -AUTOSCRIBE_SHADER_LIB(gpu model) +AUTOSCRIBE_SHADER_LIB(gpu graphics) setup_hifi_library() -link_hifi_libraries(shared gpu networking model model-networking ktx image) +link_hifi_libraries(shared gpu networking graphics model-networking ktx image) diff --git a/libraries/procedural/src/procedural/ProceduralSkybox.cpp b/libraries/procedural/src/procedural/ProceduralSkybox.cpp index 9544759037..60cb4d8fc4 100644 --- a/libraries/procedural/src/procedural/ProceduralSkybox.cpp +++ b/libraries/procedural/src/procedural/ProceduralSkybox.cpp @@ -15,8 +15,8 @@ #include #include -#include -#include +#include +#include ProceduralSkybox::ProceduralSkybox() : model::Skybox() { _procedural._vertexSource = skybox_vert; diff --git a/libraries/procedural/src/procedural/ProceduralSkybox.h b/libraries/procedural/src/procedural/ProceduralSkybox.h index 5a1133a766..14481a57c7 100644 --- a/libraries/procedural/src/procedural/ProceduralSkybox.h +++ b/libraries/procedural/src/procedural/ProceduralSkybox.h @@ -13,7 +13,7 @@ #ifndef hifi_ProceduralSkybox_h #define hifi_ProceduralSkybox_h -#include +#include #include "Procedural.h" diff --git a/libraries/render-utils/CMakeLists.txt b/libraries/render-utils/CMakeLists.txt index 94232c81b2..6be3057c93 100644 --- a/libraries/render-utils/CMakeLists.txt +++ b/libraries/render-utils/CMakeLists.txt @@ -1,9 +1,9 @@ set(TARGET_NAME render-utils) -AUTOSCRIBE_SHADER_LIB(gpu model render) +AUTOSCRIBE_SHADER_LIB(gpu graphics render) # pull in the resources.qrc file qt5_add_resources(QT_RESOURCES_FILE "${CMAKE_CURRENT_SOURCE_DIR}/res/fonts/fonts.qrc") setup_hifi_library(Widgets OpenGL Network Qml Quick Script) -link_hifi_libraries(shared ktx gpu model model-networking render animation fbx image procedural) +link_hifi_libraries(shared ktx gpu graphics model-networking render animation fbx image procedural) include_hifi_library_headers(networking) include_hifi_library_headers(octree) include_hifi_library_headers(audio) diff --git a/libraries/render-utils/src/BackgroundStage.h b/libraries/render-utils/src/BackgroundStage.h index 4e0e09db5b..b890a8cb28 100644 --- a/libraries/render-utils/src/BackgroundStage.h +++ b/libraries/render-utils/src/BackgroundStage.h @@ -11,7 +11,7 @@ #ifndef hifi_render_utils_BackgroundStage_h #define hifi_render_utils_BackgroundStage_h -#include +#include #include #include #include diff --git a/libraries/render-utils/src/DeferredGlobalLight.slh b/libraries/render-utils/src/DeferredGlobalLight.slh index ad4a9a3006..2901b4796e 100644 --- a/libraries/render-utils/src/DeferredGlobalLight.slh +++ b/libraries/render-utils/src/DeferredGlobalLight.slh @@ -11,7 +11,7 @@ <@if not DEFERRED_GLOBAL_LIGHT_SLH@> <@def DEFERRED_GLOBAL_LIGHT_SLH@> -<@include model/Light.slh@> +<@include graphics/Light.slh@> <@include LightingModel.slh@> <$declareLightBuffer()$> diff --git a/libraries/render-utils/src/DeferredLightingEffect.h b/libraries/render-utils/src/DeferredLightingEffect.h index 212d17db12..8d0fc619e5 100644 --- a/libraries/render-utils/src/DeferredLightingEffect.h +++ b/libraries/render-utils/src/DeferredLightingEffect.h @@ -17,8 +17,8 @@ #include #include -#include "model/Light.h" -#include "model/Geometry.h" +#include "graphics/Light.h" +#include "graphics/Geometry.h" #include diff --git a/libraries/render-utils/src/DrawHaze.h b/libraries/render-utils/src/DrawHaze.h index f158daa0c6..3ad42b23aa 100644 --- a/libraries/render-utils/src/DrawHaze.h +++ b/libraries/render-utils/src/DrawHaze.h @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include "SurfaceGeometryPass.h" diff --git a/libraries/render-utils/src/ForwardGlobalLight.slh b/libraries/render-utils/src/ForwardGlobalLight.slh index 3f77f85b51..e86f0c7fe3 100644 --- a/libraries/render-utils/src/ForwardGlobalLight.slh +++ b/libraries/render-utils/src/ForwardGlobalLight.slh @@ -11,7 +11,7 @@ <@if not DEFERRED_GLOBAL_LIGHT_SLH@> <@def DEFERRED_GLOBAL_LIGHT_SLH@> -<@include model/Light.slh@> +<@include graphics/Light.slh@> <@include LightingModel.slh@> <$declareLightBuffer()$> diff --git a/libraries/render-utils/src/GeometryCache.cpp b/libraries/render-utils/src/GeometryCache.cpp index 2616d08600..1fd6ca2980 100644 --- a/libraries/render-utils/src/GeometryCache.cpp +++ b/libraries/render-utils/src/GeometryCache.cpp @@ -31,7 +31,7 @@ #include "gpu/StandardShaderLib.h" -#include "model/TextureMap.h" +#include "graphics/TextureMap.h" #include "render/Args.h" #include "standardTransformPNTC_vert.h" diff --git a/libraries/render-utils/src/GeometryCache.h b/libraries/render-utils/src/GeometryCache.h index 0585cc9e55..31aa4b10ea 100644 --- a/libraries/render-utils/src/GeometryCache.h +++ b/libraries/render-utils/src/GeometryCache.h @@ -28,8 +28,8 @@ #include -#include -#include +#include +#include class SimpleProgramKey; diff --git a/libraries/render-utils/src/Haze.slf b/libraries/render-utils/src/Haze.slf index 0270aa58f0..2d7daf1f98 100644 --- a/libraries/render-utils/src/Haze.slf +++ b/libraries/render-utils/src/Haze.slf @@ -12,7 +12,7 @@ <@include DeferredTransform.slh@> <$declareDeferredFrameTransform()$> -<@include model/Light.slh@> +<@include graphics/Light.slh@> <@include LightingModel.slh@> <$declareLightBuffer()$> diff --git a/libraries/render-utils/src/HazeStage.h b/libraries/render-utils/src/HazeStage.h index c355f06644..9e729f1ef9 100644 --- a/libraries/render-utils/src/HazeStage.h +++ b/libraries/render-utils/src/HazeStage.h @@ -11,7 +11,7 @@ #ifndef hifi_render_utils_HazeStage_h #define hifi_render_utils_HazeStage_h -#include +#include #include #include #include @@ -19,7 +19,7 @@ #include #include -#include +#include // Haze stage to set up haze-related rendering tasks class HazeStage : public render::Stage { diff --git a/libraries/render-utils/src/LightPayload.h b/libraries/render-utils/src/LightPayload.h index b55373c9a8..a3032ccd90 100644 --- a/libraries/render-utils/src/LightPayload.h +++ b/libraries/render-utils/src/LightPayload.h @@ -12,7 +12,7 @@ #define hifi_LightPayload_h -#include +#include #include #include "LightStage.h" #include "TextureCache.h" diff --git a/libraries/render-utils/src/LightStage.h b/libraries/render-utils/src/LightStage.h index 3dcae550f7..8db5c19950 100644 --- a/libraries/render-utils/src/LightStage.h +++ b/libraries/render-utils/src/LightStage.h @@ -17,7 +17,7 @@ #include -#include +#include #include #include diff --git a/libraries/render-utils/src/MeshPartPayload.h b/libraries/render-utils/src/MeshPartPayload.h index 8d36395610..6e165508f2 100644 --- a/libraries/render-utils/src/MeshPartPayload.h +++ b/libraries/render-utils/src/MeshPartPayload.h @@ -19,7 +19,7 @@ #include #include -#include +#include #include "Model.h" diff --git a/libraries/render-utils/src/StencilMaskPass.cpp b/libraries/render-utils/src/StencilMaskPass.cpp index f71111b64e..ab1ac7c1aa 100644 --- a/libraries/render-utils/src/StencilMaskPass.cpp +++ b/libraries/render-utils/src/StencilMaskPass.cpp @@ -129,7 +129,7 @@ void PrepareStencil::testNoAA(gpu::State& state) { } // Pass if this area WAS marked as BACKGROUND -// (see: model/src/Skybox.cpp, procedural/src/ProceduralSkybox.cpp) +// (see: graphics/src/Skybox.cpp, procedural/src/ProceduralSkybox.cpp) void PrepareStencil::testBackground(gpu::State& state) { state.setStencilTest(true, 0x00, gpu::State::StencilTest(STENCIL_BACKGROUND, 0xFF, gpu::EQUAL, gpu::State::STENCIL_OP_KEEP, gpu::State::STENCIL_OP_KEEP, gpu::State::STENCIL_OP_KEEP)); diff --git a/libraries/render-utils/src/StencilMaskPass.h b/libraries/render-utils/src/StencilMaskPass.h index fc258b607a..ef1371d04e 100644 --- a/libraries/render-utils/src/StencilMaskPass.h +++ b/libraries/render-utils/src/StencilMaskPass.h @@ -14,7 +14,7 @@ #include #include -#include +#include class PrepareStencilConfig : public render::Job::Config { Q_OBJECT diff --git a/libraries/render-utils/src/deferred_light_point.slv b/libraries/render-utils/src/deferred_light_point.slv index 88da7dd04c..2b75ee3915 100644 --- a/libraries/render-utils/src/deferred_light_point.slv +++ b/libraries/render-utils/src/deferred_light_point.slv @@ -18,7 +18,7 @@ <$declareStandardTransform()$> -<@include model/Light.slh@> +<@include graphics/Light.slh@> <$declareLightBuffer(256)$> diff --git a/libraries/render-utils/src/deferred_light_spot.slv b/libraries/render-utils/src/deferred_light_spot.slv index f6dc7faaf1..7e3e45b3b6 100644 --- a/libraries/render-utils/src/deferred_light_spot.slv +++ b/libraries/render-utils/src/deferred_light_spot.slv @@ -18,7 +18,7 @@ <$declareStandardTransform()$> -<@include model/Light.slh@> +<@include graphics/Light.slh@> <$declareLightBuffer(256)$> uniform lightIndexBuffer { diff --git a/libraries/render-utils/src/forward_model.slf b/libraries/render-utils/src/forward_model.slf index 7b708a1d24..41ff4afc81 100644 --- a/libraries/render-utils/src/forward_model.slf +++ b/libraries/render-utils/src/forward_model.slf @@ -16,7 +16,7 @@ <@include ForwardGlobalLight.slh@> <$declareEvalSkyboxGlobalColor()$> -<@include model/Material.slh@> +<@include graphics/Material.slh@> <@include gpu/Transform.slh@> <$declareStandardCameraTransform()$> diff --git a/libraries/render-utils/src/forward_model_normal_map.slf b/libraries/render-utils/src/forward_model_normal_map.slf index a199483b9f..e5fcab4945 100644 --- a/libraries/render-utils/src/forward_model_normal_map.slf +++ b/libraries/render-utils/src/forward_model_normal_map.slf @@ -14,7 +14,7 @@ <@include ForwardBufferWrite.slh@> -<@include model/Material.slh@> +<@include graphics/Material.slh@> <@include MaterialTextures.slh@> <$declareMaterialTextures(ALBEDO, ROUGHNESS, NORMAL, _SCRIBE_NULL, EMISSIVE, OCCLUSION, SCATTERING)$> diff --git a/libraries/render-utils/src/forward_model_normal_specular_map.slf b/libraries/render-utils/src/forward_model_normal_specular_map.slf index ca6bbec3da..01a4251e8d 100644 --- a/libraries/render-utils/src/forward_model_normal_specular_map.slf +++ b/libraries/render-utils/src/forward_model_normal_specular_map.slf @@ -14,7 +14,7 @@ <@include ForwardBufferWrite.slh@> -<@include model/Material.slh@> +<@include graphics/Material.slh@> <@include MaterialTextures.slh@> <$declareMaterialTextures(ALBEDO, ROUGHNESS, NORMAL, METALLIC, EMISSIVE, OCCLUSION)$> diff --git a/libraries/render-utils/src/forward_model_specular_map.slf b/libraries/render-utils/src/forward_model_specular_map.slf index d2fdd18794..77d34d4309 100644 --- a/libraries/render-utils/src/forward_model_specular_map.slf +++ b/libraries/render-utils/src/forward_model_specular_map.slf @@ -14,7 +14,7 @@ <@include ForwardBufferWrite.slh@> -<@include model/Material.slh@> +<@include graphics/Material.slh@> <@include MaterialTextures.slh@> <$declareMaterialTextures(ALBEDO, ROUGHNESS, _SCRIBE_NULL, METALLIC, EMISSIVE, OCCLUSION)$> diff --git a/libraries/render-utils/src/forward_model_translucent.slf b/libraries/render-utils/src/forward_model_translucent.slf index 906393db1f..7f752d893a 100644 --- a/libraries/render-utils/src/forward_model_translucent.slf +++ b/libraries/render-utils/src/forward_model_translucent.slf @@ -12,7 +12,7 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // -<@include model/Material.slh@> +<@include graphics/Material.slh@> <@include ForwardGlobalLight.slh@> diff --git a/libraries/render-utils/src/forward_model_unlit.slf b/libraries/render-utils/src/forward_model_unlit.slf index fb760467c9..72ee61e28c 100644 --- a/libraries/render-utils/src/forward_model_unlit.slf +++ b/libraries/render-utils/src/forward_model_unlit.slf @@ -14,7 +14,7 @@ <@include ForwardBufferWrite.slh@> <@include LightingModel.slh@> -<@include model/Material.slh@> +<@include graphics/Material.slh@> <@include MaterialTextures.slh@> <$declareMaterialTextures(ALBEDO)$> diff --git a/libraries/render-utils/src/lightClusters_drawClusterContent.slf b/libraries/render-utils/src/lightClusters_drawClusterContent.slf index 447f8bd634..739709418d 100644 --- a/libraries/render-utils/src/lightClusters_drawClusterContent.slf +++ b/libraries/render-utils/src/lightClusters_drawClusterContent.slf @@ -15,7 +15,7 @@ <@include DeferredBufferRead.slh@> -<@include model/Light.slh@> +<@include graphics/Light.slh@> <$declareLightBuffer(256)$> <@include LightClusterGrid.slh@> diff --git a/libraries/render-utils/src/local_lights_drawOutline.slf b/libraries/render-utils/src/local_lights_drawOutline.slf index 3aa210a241..56ce1e61a5 100644 --- a/libraries/render-utils/src/local_lights_drawOutline.slf +++ b/libraries/render-utils/src/local_lights_drawOutline.slf @@ -18,7 +18,7 @@ <$declareDeferredCurvature()$> // Everything about light -<@include model/Light.slh@> +<@include graphics/Light.slh@> <$declareLightBuffer(128)$> <@include LightingModel.slh@> diff --git a/libraries/render-utils/src/local_lights_shading.slf b/libraries/render-utils/src/local_lights_shading.slf index a935a8cb89..c3208de726 100644 --- a/libraries/render-utils/src/local_lights_shading.slf +++ b/libraries/render-utils/src/local_lights_shading.slf @@ -18,7 +18,7 @@ <$declareDeferredCurvature()$> // Everything about light -<@include model/Light.slh@> +<@include graphics/Light.slh@> <$declareLightBuffer(256)$> <@include LightingModel.slh@> diff --git a/libraries/render-utils/src/model.slf b/libraries/render-utils/src/model.slf index daeead65ec..4747b69278 100644 --- a/libraries/render-utils/src/model.slf +++ b/libraries/render-utils/src/model.slf @@ -13,7 +13,7 @@ <@include DeferredBufferWrite.slh@> -<@include model/Material.slh@> +<@include graphics/Material.slh@> <@include MaterialTextures.slh@> <$declareMaterialTextures(ALBEDO, ROUGHNESS, _SCRIBE_NULL, _SCRIBE_NULL, EMISSIVE, OCCLUSION)$> diff --git a/libraries/render-utils/src/model_fade.slf b/libraries/render-utils/src/model_fade.slf index d232667660..40c156a3a4 100644 --- a/libraries/render-utils/src/model_fade.slf +++ b/libraries/render-utils/src/model_fade.slf @@ -13,7 +13,7 @@ <@include DeferredBufferWrite.slh@> -<@include model/Material.slh@> +<@include graphics/Material.slh@> <@include MaterialTextures.slh@> <$declareMaterialTextures(ALBEDO, ROUGHNESS, _SCRIBE_NULL, _SCRIBE_NULL, EMISSIVE, OCCLUSION)$> diff --git a/libraries/render-utils/src/model_lightmap.slf b/libraries/render-utils/src/model_lightmap.slf index 3a8cfde290..b22a1029f9 100644 --- a/libraries/render-utils/src/model_lightmap.slf +++ b/libraries/render-utils/src/model_lightmap.slf @@ -14,7 +14,7 @@ <@include DeferredBufferWrite.slh@> -<@include model/Material.slh@> +<@include graphics/Material.slh@> <@include MaterialTextures.slh@> <$declareMaterialTextures(ALBEDO, ROUGHNESS)$> diff --git a/libraries/render-utils/src/model_lightmap_fade.slf b/libraries/render-utils/src/model_lightmap_fade.slf index 92d00a2046..55cb24d35d 100644 --- a/libraries/render-utils/src/model_lightmap_fade.slf +++ b/libraries/render-utils/src/model_lightmap_fade.slf @@ -14,7 +14,7 @@ <@include DeferredBufferWrite.slh@> -<@include model/Material.slh@> +<@include graphics/Material.slh@> <@include MaterialTextures.slh@> <$declareMaterialTextures(ALBEDO, ROUGHNESS)$> diff --git a/libraries/render-utils/src/model_lightmap_normal_map.slf b/libraries/render-utils/src/model_lightmap_normal_map.slf index 81de1e5d5b..1510ea9ba3 100644 --- a/libraries/render-utils/src/model_lightmap_normal_map.slf +++ b/libraries/render-utils/src/model_lightmap_normal_map.slf @@ -14,7 +14,7 @@ <@include DeferredBufferWrite.slh@> -<@include model/Material.slh@> +<@include graphics/Material.slh@> <@include MaterialTextures.slh@> <$declareMaterialTextures(ALBEDO, ROUGHNESS, NORMAL)$> diff --git a/libraries/render-utils/src/model_lightmap_normal_map_fade.slf b/libraries/render-utils/src/model_lightmap_normal_map_fade.slf index 825e84d666..6b63943a9a 100644 --- a/libraries/render-utils/src/model_lightmap_normal_map_fade.slf +++ b/libraries/render-utils/src/model_lightmap_normal_map_fade.slf @@ -14,7 +14,7 @@ <@include DeferredBufferWrite.slh@> -<@include model/Material.slh@> +<@include graphics/Material.slh@> <@include MaterialTextures.slh@> <$declareMaterialTextures(ALBEDO, ROUGHNESS, NORMAL)$> diff --git a/libraries/render-utils/src/model_lightmap_normal_specular_map.slf b/libraries/render-utils/src/model_lightmap_normal_specular_map.slf index 944da27b01..3a66aaad3d 100644 --- a/libraries/render-utils/src/model_lightmap_normal_specular_map.slf +++ b/libraries/render-utils/src/model_lightmap_normal_specular_map.slf @@ -14,7 +14,7 @@ <@include DeferredBufferWrite.slh@> -<@include model/Material.slh@> +<@include graphics/Material.slh@> <@include MaterialTextures.slh@> <$declareMaterialTextures(ALBEDO, ROUGHNESS, NORMAL, METALLIC)$> diff --git a/libraries/render-utils/src/model_lightmap_normal_specular_map_fade.slf b/libraries/render-utils/src/model_lightmap_normal_specular_map_fade.slf index 791d5bf552..b785a8a6ab 100644 --- a/libraries/render-utils/src/model_lightmap_normal_specular_map_fade.slf +++ b/libraries/render-utils/src/model_lightmap_normal_specular_map_fade.slf @@ -14,7 +14,7 @@ <@include DeferredBufferWrite.slh@> -<@include model/Material.slh@> +<@include graphics/Material.slh@> <@include MaterialTextures.slh@> <$declareMaterialTextures(ALBEDO, ROUGHNESS, NORMAL, METALLIC)$> diff --git a/libraries/render-utils/src/model_lightmap_specular_map.slf b/libraries/render-utils/src/model_lightmap_specular_map.slf index 4dbc10a834..1c97d435bd 100644 --- a/libraries/render-utils/src/model_lightmap_specular_map.slf +++ b/libraries/render-utils/src/model_lightmap_specular_map.slf @@ -14,7 +14,7 @@ <@include DeferredBufferWrite.slh@> -<@include model/Material.slh@> +<@include graphics/Material.slh@> <@include MaterialTextures.slh@> <$declareMaterialTextures(ALBEDO, ROUGHNESS, _SCRIBE_NULL, METALLIC)$> diff --git a/libraries/render-utils/src/model_lightmap_specular_map_fade.slf b/libraries/render-utils/src/model_lightmap_specular_map_fade.slf index e82018eefb..1adedb9328 100644 --- a/libraries/render-utils/src/model_lightmap_specular_map_fade.slf +++ b/libraries/render-utils/src/model_lightmap_specular_map_fade.slf @@ -14,7 +14,7 @@ <@include DeferredBufferWrite.slh@> -<@include model/Material.slh@> +<@include graphics/Material.slh@> <@include MaterialTextures.slh@> <$declareMaterialTextures(ALBEDO, ROUGHNESS, _SCRIBE_NULL, METALLIC)$> diff --git a/libraries/render-utils/src/model_normal_map.slf b/libraries/render-utils/src/model_normal_map.slf index 063950609a..bed85b4b15 100644 --- a/libraries/render-utils/src/model_normal_map.slf +++ b/libraries/render-utils/src/model_normal_map.slf @@ -14,7 +14,7 @@ <@include DeferredBufferWrite.slh@> -<@include model/Material.slh@> +<@include graphics/Material.slh@> <@include MaterialTextures.slh@> <$declareMaterialTextures(ALBEDO, ROUGHNESS, NORMAL, _SCRIBE_NULL, EMISSIVE, OCCLUSION, SCATTERING)$> diff --git a/libraries/render-utils/src/model_normal_map_fade.slf b/libraries/render-utils/src/model_normal_map_fade.slf index d8b864260c..5a166b1c2c 100644 --- a/libraries/render-utils/src/model_normal_map_fade.slf +++ b/libraries/render-utils/src/model_normal_map_fade.slf @@ -14,7 +14,7 @@ <@include DeferredBufferWrite.slh@> -<@include model/Material.slh@> +<@include graphics/Material.slh@> <@include MaterialTextures.slh@> <$declareMaterialTextures(ALBEDO, ROUGHNESS, NORMAL, _SCRIBE_NULL, EMISSIVE, OCCLUSION, SCATTERING)$> diff --git a/libraries/render-utils/src/model_normal_specular_map.slf b/libraries/render-utils/src/model_normal_specular_map.slf index 9e079b33a0..3eb3d43fdc 100644 --- a/libraries/render-utils/src/model_normal_specular_map.slf +++ b/libraries/render-utils/src/model_normal_specular_map.slf @@ -14,7 +14,7 @@ <@include DeferredBufferWrite.slh@> -<@include model/Material.slh@> +<@include graphics/Material.slh@> <@include MaterialTextures.slh@> <$declareMaterialTextures(ALBEDO, ROUGHNESS, NORMAL, METALLIC, EMISSIVE, OCCLUSION)$> diff --git a/libraries/render-utils/src/model_normal_specular_map_fade.slf b/libraries/render-utils/src/model_normal_specular_map_fade.slf index 5492b24763..0985d5d493 100644 --- a/libraries/render-utils/src/model_normal_specular_map_fade.slf +++ b/libraries/render-utils/src/model_normal_specular_map_fade.slf @@ -14,7 +14,7 @@ <@include DeferredBufferWrite.slh@> -<@include model/Material.slh@> +<@include graphics/Material.slh@> <@include MaterialTextures.slh@> <$declareMaterialTextures(ALBEDO, ROUGHNESS, NORMAL, METALLIC, EMISSIVE, OCCLUSION)$> diff --git a/libraries/render-utils/src/model_specular_map.slf b/libraries/render-utils/src/model_specular_map.slf index 47b5e3389d..e65dbaeda6 100644 --- a/libraries/render-utils/src/model_specular_map.slf +++ b/libraries/render-utils/src/model_specular_map.slf @@ -14,7 +14,7 @@ <@include DeferredBufferWrite.slh@> -<@include model/Material.slh@> +<@include graphics/Material.slh@> <@include MaterialTextures.slh@> <$declareMaterialTextures(ALBEDO, ROUGHNESS, _SCRIBE_NULL, METALLIC, EMISSIVE, OCCLUSION)$> diff --git a/libraries/render-utils/src/model_specular_map_fade.slf b/libraries/render-utils/src/model_specular_map_fade.slf index 6eb56c0929..17173d8bc3 100644 --- a/libraries/render-utils/src/model_specular_map_fade.slf +++ b/libraries/render-utils/src/model_specular_map_fade.slf @@ -14,7 +14,7 @@ <@include DeferredBufferWrite.slh@> -<@include model/Material.slh@> +<@include graphics/Material.slh@> <@include MaterialTextures.slh@> <$declareMaterialTextures(ALBEDO, ROUGHNESS, _SCRIBE_NULL, METALLIC, EMISSIVE, OCCLUSION)$> diff --git a/libraries/render-utils/src/model_translucent.slf b/libraries/render-utils/src/model_translucent.slf index 7e64c5ab8b..0924389dba 100644 --- a/libraries/render-utils/src/model_translucent.slf +++ b/libraries/render-utils/src/model_translucent.slf @@ -12,7 +12,7 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // -<@include model/Material.slh@> +<@include graphics/Material.slh@> <@include DeferredGlobalLight.slh@> diff --git a/libraries/render-utils/src/model_translucent_fade.slf b/libraries/render-utils/src/model_translucent_fade.slf index 0d5a452fed..8ac442476f 100644 --- a/libraries/render-utils/src/model_translucent_fade.slf +++ b/libraries/render-utils/src/model_translucent_fade.slf @@ -12,7 +12,7 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // -<@include model/Material.slh@> +<@include graphics/Material.slh@> <@include DeferredGlobalLight.slh@> diff --git a/libraries/render-utils/src/model_translucent_unlit.slf b/libraries/render-utils/src/model_translucent_unlit.slf index b397cea5aa..4c3a0f0195 100644 --- a/libraries/render-utils/src/model_translucent_unlit.slf +++ b/libraries/render-utils/src/model_translucent_unlit.slf @@ -12,7 +12,7 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // -<@include model/Material.slh@> +<@include graphics/Material.slh@> <@include MaterialTextures.slh@> <$declareMaterialTextures(ALBEDO, ROUGHNESS, _SCRIBE_NULL, _SCRIBE_NULL, EMISSIVE, OCCLUSION)$> diff --git a/libraries/render-utils/src/model_translucent_unlit_fade.slf b/libraries/render-utils/src/model_translucent_unlit_fade.slf index 6a77efe4ca..210060d54d 100644 --- a/libraries/render-utils/src/model_translucent_unlit_fade.slf +++ b/libraries/render-utils/src/model_translucent_unlit_fade.slf @@ -12,7 +12,7 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // -<@include model/Material.slh@> +<@include graphics/Material.slh@> <@include MaterialTextures.slh@> <$declareMaterialTextures(ALBEDO, ROUGHNESS, _SCRIBE_NULL, _SCRIBE_NULL, EMISSIVE, OCCLUSION)$> diff --git a/libraries/render-utils/src/model_unlit.slf b/libraries/render-utils/src/model_unlit.slf index 750b51fe8c..ccfc7d4935 100644 --- a/libraries/render-utils/src/model_unlit.slf +++ b/libraries/render-utils/src/model_unlit.slf @@ -14,7 +14,7 @@ <@include DeferredBufferWrite.slh@> <@include LightingModel.slh@> -<@include model/Material.slh@> +<@include graphics/Material.slh@> <@include MaterialTextures.slh@> <$declareMaterialTextures(ALBEDO)$> diff --git a/libraries/render-utils/src/model_unlit_fade.slf b/libraries/render-utils/src/model_unlit_fade.slf index 0fe9f2ebac..65c97f9e21 100644 --- a/libraries/render-utils/src/model_unlit_fade.slf +++ b/libraries/render-utils/src/model_unlit_fade.slf @@ -14,7 +14,7 @@ <@include DeferredBufferWrite.slh@> <@include LightingModel.slh@> -<@include model/Material.slh@> +<@include graphics/Material.slh@> <@include Fade.slh@> <$declareFadeFragment()$> diff --git a/libraries/render-utils/src/overlay3D.slf b/libraries/render-utils/src/overlay3D.slf index b58dd5afac..dcded917b4 100644 --- a/libraries/render-utils/src/overlay3D.slf +++ b/libraries/render-utils/src/overlay3D.slf @@ -12,7 +12,7 @@ // -<@include model/Light.slh@> +<@include graphics/Light.slh@> <$declareLightBuffer()$> <$declareLightAmbientBuffer()$> diff --git a/libraries/render-utils/src/overlay3D_model.slf b/libraries/render-utils/src/overlay3D_model.slf index ea61c2bb75..d4de0ee69f 100644 --- a/libraries/render-utils/src/overlay3D_model.slf +++ b/libraries/render-utils/src/overlay3D_model.slf @@ -14,7 +14,7 @@ <@include DeferredGlobalLight.slh@> <$declareEvalSkyboxGlobalColor()$> -<@include model/Material.slh@> +<@include graphics/Material.slh@> <@include gpu/Transform.slh@> <$declareStandardCameraTransform()$> diff --git a/libraries/render-utils/src/overlay3D_model_translucent.slf b/libraries/render-utils/src/overlay3D_model_translucent.slf index b6ae8eb75e..8dd3a81443 100644 --- a/libraries/render-utils/src/overlay3D_model_translucent.slf +++ b/libraries/render-utils/src/overlay3D_model_translucent.slf @@ -13,7 +13,7 @@ <@include DeferredGlobalLight.slh@> <$declareEvalGlobalLightingAlphaBlended()$> -<@include model/Material.slh@> +<@include graphics/Material.slh@> <@include gpu/Transform.slh@> <$declareStandardCameraTransform()$> diff --git a/libraries/render-utils/src/overlay3D_model_translucent_unlit.slf b/libraries/render-utils/src/overlay3D_model_translucent_unlit.slf index 3dd8138272..3b79818cd9 100644 --- a/libraries/render-utils/src/overlay3D_model_translucent_unlit.slf +++ b/libraries/render-utils/src/overlay3D_model_translucent_unlit.slf @@ -12,7 +12,7 @@ // <@include LightingModel.slh@> -<@include model/Material.slh@> +<@include graphics/Material.slh@> <@include MaterialTextures.slh@> <$declareMaterialTextures(ALBEDO)$> diff --git a/libraries/render-utils/src/overlay3D_model_unlit.slf b/libraries/render-utils/src/overlay3D_model_unlit.slf index 80c2bb971e..eab975e810 100644 --- a/libraries/render-utils/src/overlay3D_model_unlit.slf +++ b/libraries/render-utils/src/overlay3D_model_unlit.slf @@ -12,7 +12,7 @@ // <@include LightingModel.slh@> -<@include model/Material.slh@> +<@include graphics/Material.slh@> <@include MaterialTextures.slh@> <$declareMaterialTextures(ALBEDO)$> diff --git a/libraries/render-utils/src/overlay3D_translucent.slf b/libraries/render-utils/src/overlay3D_translucent.slf index 72bd0d740e..64035ac984 100644 --- a/libraries/render-utils/src/overlay3D_translucent.slf +++ b/libraries/render-utils/src/overlay3D_translucent.slf @@ -12,7 +12,7 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // -<@include model/Light.slh@> +<@include graphics/Light.slh@> <$declareLightBuffer()$> <$declareLightAmbientBuffer()$> diff --git a/libraries/render-utils/src/simple.slf b/libraries/render-utils/src/simple.slf index fd45c6c134..7b32541c63 100644 --- a/libraries/render-utils/src/simple.slf +++ b/libraries/render-utils/src/simple.slf @@ -13,7 +13,7 @@ // <@include DeferredBufferWrite.slh@> -<@include model/Material.slh@> +<@include graphics/Material.slh@> // the interpolated normal in vec3 _normal; diff --git a/libraries/render-utils/src/simple_fade.slf b/libraries/render-utils/src/simple_fade.slf index 245d32e81e..ce9251b9a5 100644 --- a/libraries/render-utils/src/simple_fade.slf +++ b/libraries/render-utils/src/simple_fade.slf @@ -13,7 +13,7 @@ // <@include DeferredBufferWrite.slh@> -<@include model/Material.slh@> +<@include graphics/Material.slh@> <@include Fade.slh@> <$declareFadeFragmentInstanced()$> diff --git a/libraries/render-utils/src/simple_textured.slf b/libraries/render-utils/src/simple_textured.slf index 550f6546fd..34fcbc77dc 100644 --- a/libraries/render-utils/src/simple_textured.slf +++ b/libraries/render-utils/src/simple_textured.slf @@ -14,7 +14,7 @@ <@include gpu/Color.slh@> <@include DeferredBufferWrite.slh@> -<@include model/Material.slh@> +<@include graphics/Material.slh@> // the albedo texture uniform sampler2D originalTexture; diff --git a/libraries/render-utils/src/simple_textured_fade.slf b/libraries/render-utils/src/simple_textured_fade.slf index 025fe5fca6..2061cabdfc 100644 --- a/libraries/render-utils/src/simple_textured_fade.slf +++ b/libraries/render-utils/src/simple_textured_fade.slf @@ -14,7 +14,7 @@ <@include gpu/Color.slh@> <@include DeferredBufferWrite.slh@> -<@include model/Material.slh@> +<@include graphics/Material.slh@> <@include Fade.slh@> diff --git a/libraries/render-utils/src/subsurfaceScattering_drawScattering.slf b/libraries/render-utils/src/subsurfaceScattering_drawScattering.slf index 981993615c..ad6918d727 100644 --- a/libraries/render-utils/src/subsurfaceScattering_drawScattering.slf +++ b/libraries/render-utils/src/subsurfaceScattering_drawScattering.slf @@ -12,7 +12,7 @@ <@include DeferredBufferRead.slh@> -<@include model/Light.slh@> +<@include graphics/Light.slh@> <$declareLightBuffer()$> <$declareDeferredCurvature()$> diff --git a/libraries/render-utils/src/zone_drawAmbient.slf b/libraries/render-utils/src/zone_drawAmbient.slf index f104e5be44..3407fe8467 100644 --- a/libraries/render-utils/src/zone_drawAmbient.slf +++ b/libraries/render-utils/src/zone_drawAmbient.slf @@ -10,7 +10,7 @@ // <@include zone_draw.slh@> -<@include model/Light.slh@> +<@include graphics/Light.slh@> <@include LightingModel.slh@> <$declareLightAmbientBuffer()$> diff --git a/libraries/render-utils/src/zone_drawKeyLight.slf b/libraries/render-utils/src/zone_drawKeyLight.slf index e96239b6dc..ea11c775b4 100644 --- a/libraries/render-utils/src/zone_drawKeyLight.slf +++ b/libraries/render-utils/src/zone_drawKeyLight.slf @@ -10,7 +10,7 @@ // <@include zone_draw.slh@> -<@include model/Light.slh@> +<@include graphics/Light.slh@> <@include LightingModel.slh@> <$declareLightBuffer()$> diff --git a/libraries/render/CMakeLists.txt b/libraries/render/CMakeLists.txt index 8fd05bd320..1d88c3e5f5 100644 --- a/libraries/render/CMakeLists.txt +++ b/libraries/render/CMakeLists.txt @@ -1,8 +1,8 @@ set(TARGET_NAME render) -AUTOSCRIBE_SHADER_LIB(gpu model) +AUTOSCRIBE_SHADER_LIB(gpu graphics) setup_hifi_library() # render needs octree only for getAccuracyAngle(float, int) -link_hifi_libraries(shared ktx gpu model octree) +link_hifi_libraries(shared ktx gpu graphics octree) target_nsight() diff --git a/libraries/render/src/render/Item.h b/libraries/render/src/render/Item.h index 77f5910b9e..e977c95fa0 100644 --- a/libraries/render/src/render/Item.h +++ b/libraries/render/src/render/Item.h @@ -25,7 +25,7 @@ #include "Args.h" -#include +#include #include "ShapePipeline.h" namespace render { diff --git a/libraries/script-engine/CMakeLists.txt b/libraries/script-engine/CMakeLists.txt index 87296b187f..478e4c4765 100644 --- a/libraries/script-engine/CMakeLists.txt +++ b/libraries/script-engine/CMakeLists.txt @@ -16,6 +16,6 @@ if (NOT ANDROID) endif () -link_hifi_libraries(shared networking octree gpu procedural model model-networking ktx recording avatars fbx entities controllers animation audio physics image midi) +link_hifi_libraries(shared networking octree gpu procedural graphics model-networking ktx recording avatars fbx entities controllers animation audio physics image midi) # ui includes gl, but link_hifi_libraries does not use transitive includes, so gl must be explicit include_hifi_library_headers(gl) diff --git a/libraries/script-engine/src/SceneScriptingInterface.h b/libraries/script-engine/src/SceneScriptingInterface.h index 7bc22eb3e6..160c37284c 100644 --- a/libraries/script-engine/src/SceneScriptingInterface.h +++ b/libraries/script-engine/src/SceneScriptingInterface.h @@ -15,7 +15,7 @@ #include // QObject #include // Dependency -#include "model/Stage.h" +#include "graphics/Stage.h" // TODO: if QT moc ever supports nested classes, subclass these to the interface instead of namespacing namespace SceneScripting { diff --git a/plugins/openvr/CMakeLists.txt b/plugins/openvr/CMakeLists.txt index 7878ae2d7e..9ae9b25b65 100644 --- a/plugins/openvr/CMakeLists.txt +++ b/plugins/openvr/CMakeLists.txt @@ -13,7 +13,7 @@ if (WIN32) setup_hifi_plugin(OpenGL Script Qml Widgets Multimedia) link_hifi_libraries(shared gl networking controllers ui plugins display-plugins ui-plugins input-plugins script-engine - audio-client render-utils model gpu gpu-gl render model-networking fbx ktx image procedural) + audio-client render-utils graphics gpu gpu-gl render model-networking fbx ktx image procedural) include_hifi_library_headers(octree) diff --git a/plugins/openvr/src/ViveControllerManager.h b/plugins/openvr/src/ViveControllerManager.h index 772facc21f..b5db1db5a8 100644 --- a/plugins/openvr/src/ViveControllerManager.h +++ b/plugins/openvr/src/ViveControllerManager.h @@ -19,7 +19,7 @@ #include #include -#include +#include #include #include #include diff --git a/tests/animation/CMakeLists.txt b/tests/animation/CMakeLists.txt index 2a07f6f429..40f76ee362 100644 --- a/tests/animation/CMakeLists.txt +++ b/tests/animation/CMakeLists.txt @@ -1,7 +1,7 @@ # Declare dependencies macro (setup_testcase_dependencies) # link in the shared libraries - link_hifi_libraries(shared animation gpu fbx model networking) + link_hifi_libraries(shared animation gpu fbx graphics networking) package_libraries_for_deployment() endmacro () diff --git a/tests/entities/CMakeLists.txt b/tests/entities/CMakeLists.txt index 0c33eb8555..6d0bf9f149 100644 --- a/tests/entities/CMakeLists.txt +++ b/tests/entities/CMakeLists.txt @@ -7,7 +7,7 @@ setup_memory_debugger() set_target_properties(${TARGET_NAME} PROPERTIES FOLDER "Tests/manual-tests/") # link in the shared libraries -link_hifi_libraries(entities avatars shared octree gpu model fbx networking animation audio gl) +link_hifi_libraries(entities avatars shared octree gpu graphics fbx networking animation audio gl) if (WIN32) add_dependency_external_projects(wasapi) diff --git a/tests/gpu-test/CMakeLists.txt b/tests/gpu-test/CMakeLists.txt index 8e49d523b8..9772320812 100644 --- a/tests/gpu-test/CMakeLists.txt +++ b/tests/gpu-test/CMakeLists.txt @@ -1,10 +1,10 @@ set(TARGET_NAME gpu-test) -AUTOSCRIBE_SHADER_LIB(gpu model render-utils) +AUTOSCRIBE_SHADER_LIB(gpu graphics render-utils) # This is not a testcase -- just set it up as a regular hifi project setup_hifi_project(Quick Gui OpenGL Script Widgets) setup_memory_debugger() set_target_properties(${TARGET_NAME} PROPERTIES FOLDER "Tests/manual-tests/") -link_hifi_libraries(networking gl gpu gpu-gl procedural shared fbx model model-networking animation script-engine render render-utils octree image ktx) +link_hifi_libraries(networking gl gpu gpu-gl procedural shared fbx graphics model-networking animation script-engine render render-utils octree image ktx) if (WIN32) add_dependency_external_projects(wasapi) diff --git a/tests/octree/CMakeLists.txt b/tests/octree/CMakeLists.txt index 224b97c75c..a685e06172 100644 --- a/tests/octree/CMakeLists.txt +++ b/tests/octree/CMakeLists.txt @@ -2,7 +2,7 @@ # Declare dependencies macro (setup_testcase_dependencies) # link in the shared libraries - link_hifi_libraries(shared octree gpu model fbx networking entities avatars audio animation script-engine physics) + link_hifi_libraries(shared octree gpu graphics fbx networking entities avatars audio animation script-engine physics) package_libraries_for_deployment() endmacro () diff --git a/tests/physics/CMakeLists.txt b/tests/physics/CMakeLists.txt index 755886ebbf..1f1b52bf28 100644 --- a/tests/physics/CMakeLists.txt +++ b/tests/physics/CMakeLists.txt @@ -2,7 +2,7 @@ # Declare dependencies macro (SETUP_TESTCASE_DEPENDENCIES) target_bullet() - link_hifi_libraries(shared physics gpu model) + link_hifi_libraries(shared physics gpu graphics) package_libraries_for_deployment() endmacro () diff --git a/tests/render-perf/CMakeLists.txt b/tests/render-perf/CMakeLists.txt index 09b2dc6a50..9739533fd2 100644 --- a/tests/render-perf/CMakeLists.txt +++ b/tests/render-perf/CMakeLists.txt @@ -12,7 +12,7 @@ setup_hifi_project(Quick Gui OpenGL) set_target_properties(${TARGET_NAME} PROPERTIES FOLDER "Tests/manual-tests/") # link in the shared libraries -link_hifi_libraries(shared networking model fbx ktx image octree gl gpu gpu-gl render model-networking networking render-utils entities entities-renderer animation audio avatars script-engine physics procedural midi ui) +link_hifi_libraries(shared networking graphics fbx ktx image octree gl gpu gpu-gl render model-networking networking render-utils entities entities-renderer animation audio avatars script-engine physics procedural midi ui) if (WIN32) target_link_libraries(${TARGET_NAME} Winmm.lib) diff --git a/tests/render-perf/src/main.cpp b/tests/render-perf/src/main.cpp index c70a74cd7f..921ceb079e 100644 --- a/tests/render-perf/src/main.cpp +++ b/tests/render-perf/src/main.cpp @@ -59,7 +59,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tests/render-texture-load/CMakeLists.txt b/tests/render-texture-load/CMakeLists.txt index 432a1f00d6..302ddd0f97 100644 --- a/tests/render-texture-load/CMakeLists.txt +++ b/tests/render-texture-load/CMakeLists.txt @@ -12,7 +12,7 @@ setup_hifi_project(Quick Gui OpenGL) set_target_properties(${TARGET_NAME} PROPERTIES FOLDER "Tests/manual-tests/") # link in the shared libraries -link_hifi_libraries(shared octree gl gpu gpu-gl render model model-networking networking render-utils fbx entities entities-renderer animation audio avatars script-engine physics ktx image) +link_hifi_libraries(shared octree gl gpu gpu-gl render graphics model-networking networking render-utils fbx entities entities-renderer animation audio avatars script-engine physics ktx image) package_libraries_for_deployment() diff --git a/tests/shaders/CMakeLists.txt b/tests/shaders/CMakeLists.txt index ba4ca88127..a6796b8601 100644 --- a/tests/shaders/CMakeLists.txt +++ b/tests/shaders/CMakeLists.txt @@ -8,14 +8,14 @@ set_target_properties(${TARGET_NAME} PROPERTIES FOLDER "Tests/manual-tests/") setup_memory_debugger() # link in the shared libraries -link_hifi_libraries(shared octree gl gpu gpu-gl model render fbx networking entities +link_hifi_libraries(shared octree gl gpu gpu-gl graphics render fbx networking entities script-engine physics render-utils entities-renderer) include_directories("${PROJECT_BINARY_DIR}/../../libraries/gpu/") include_directories("${PROJECT_BINARY_DIR}/../../libraries/render-utils/") include_directories("${PROJECT_BINARY_DIR}/../../libraries/entities-renderer/") -include_directories("${PROJECT_BINARY_DIR}/../../libraries/model/") +include_directories("${PROJECT_BINARY_DIR}/../../libraries/graphics/") if (WIN32) add_dependency_external_projects(wasapi) diff --git a/tests/shaders/src/main.cpp b/tests/shaders/src/main.cpp index 7c6886ad93..cd307ba362 100644 --- a/tests/shaders/src/main.cpp +++ b/tests/shaders/src/main.cpp @@ -64,8 +64,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/tools/oven/CMakeLists.txt b/tools/oven/CMakeLists.txt index 00344179bd..549414cbab 100644 --- a/tools/oven/CMakeLists.txt +++ b/tools/oven/CMakeLists.txt @@ -2,7 +2,7 @@ set(TARGET_NAME oven) setup_hifi_project(Widgets Gui Concurrent) -link_hifi_libraries(networking shared image gpu ktx fbx baking model) +link_hifi_libraries(networking shared image gpu ktx fbx baking graphics) setup_memory_debugger() diff --git a/tools/skeleton-dump/CMakeLists.txt b/tools/skeleton-dump/CMakeLists.txt index bb2fe24f51..1c30e322d6 100644 --- a/tools/skeleton-dump/CMakeLists.txt +++ b/tools/skeleton-dump/CMakeLists.txt @@ -1,5 +1,5 @@ set(TARGET_NAME skeleton-dump) setup_hifi_project(Core Widgets) setup_memory_debugger() -link_hifi_libraries(shared fbx model gpu gl animation) +link_hifi_libraries(shared fbx graphics gpu gl animation) diff --git a/tools/vhacd-util/CMakeLists.txt b/tools/vhacd-util/CMakeLists.txt index c28aa9efa4..599561bd2d 100644 --- a/tools/vhacd-util/CMakeLists.txt +++ b/tools/vhacd-util/CMakeLists.txt @@ -1,6 +1,6 @@ set(TARGET_NAME vhacd-util) setup_hifi_project(Core Widgets) -link_hifi_libraries(shared fbx model gpu gl) +link_hifi_libraries(shared fbx graphics gpu gl) add_dependency_external_projects(vhacd) From b91d536dd0ee17c0572e4cb39b8bd0b337fa9e5e Mon Sep 17 00:00:00 2001 From: humbletim Date: Tue, 16 Jan 2018 12:46:16 -0500 Subject: [PATCH 2/2] rename model:: -> graphics:: --- interface/src/Application.cpp | 2 +- interface/src/Application.h | 4 +- .../src/RenderableLightEntityItem.cpp | 4 +- .../src/RenderableModelEntityItem.cpp | 24 +++++----- .../src/RenderablePolyVoxEntityItem.cpp | 20 ++++----- .../src/RenderablePolyVoxEntityItem.h | 6 +-- .../src/RenderableZoneEntityItem.cpp | 14 +++--- .../src/RenderableZoneEntityItem.h | 18 ++++---- libraries/fbx/src/FBX.h | 4 +- libraries/fbx/src/FBXReader.cpp | 2 +- libraries/fbx/src/FBXReader_Material.cpp | 4 +- libraries/fbx/src/FBXReader_Mesh.cpp | 28 ++++++------ libraries/fbx/src/GLTFReader.cpp | 2 +- libraries/fbx/src/OBJReader.cpp | 6 +-- libraries/fbx/src/OBJWriter.cpp | 6 +-- libraries/fbx/src/OBJWriter.h | 2 +- libraries/graphics/src/graphics/Asset.cpp | 2 +- libraries/graphics/src/graphics/Asset.h | 2 +- libraries/graphics/src/graphics/Forward.h | 2 +- libraries/graphics/src/graphics/Geometry.cpp | 24 +++++----- libraries/graphics/src/graphics/Geometry.h | 4 +- libraries/graphics/src/graphics/Haze.cpp | 2 +- libraries/graphics/src/graphics/Haze.h | 2 +- libraries/graphics/src/graphics/Light.cpp | 2 +- libraries/graphics/src/graphics/Light.h | 2 +- libraries/graphics/src/graphics/Material.cpp | 2 +- libraries/graphics/src/graphics/Material.h | 2 +- libraries/graphics/src/graphics/Skybox.cpp | 2 +- libraries/graphics/src/graphics/Skybox.h | 2 +- libraries/graphics/src/graphics/Stage.cpp | 2 +- libraries/graphics/src/graphics/Stage.h | 2 +- .../graphics/src/graphics/TextureMap.cpp | 2 +- libraries/graphics/src/graphics/TextureMap.h | 2 +- .../src/model-networking/ModelCache.cpp | 10 ++--- .../src/model-networking/ModelCache.h | 10 ++--- .../physics/src/CollisionRenderMeshCache.cpp | 24 +++++----- .../physics/src/CollisionRenderMeshCache.h | 4 +- .../src/procedural/ProceduralSkybox.cpp | 2 +- .../src/procedural/ProceduralSkybox.h | 2 +- .../render-utils/src/BackgroundStage.cpp | 10 ++--- libraries/render-utils/src/BackgroundStage.h | 4 +- .../src/DeferredLightingEffect.cpp | 42 +++++++++--------- .../render-utils/src/DeferredLightingEffect.h | 20 ++++----- libraries/render-utils/src/DrawHaze.cpp | 18 ++++---- libraries/render-utils/src/DrawHaze.h | 44 +++++++++---------- libraries/render-utils/src/HazeStage.cpp | 14 +++--- libraries/render-utils/src/HazeStage.h | 28 ++++++------ libraries/render-utils/src/LightPayload.cpp | 4 +- libraries/render-utils/src/LightPayload.h | 8 ++-- libraries/render-utils/src/LightStage.cpp | 32 +++++++------- libraries/render-utils/src/LightStage.h | 20 ++++----- .../render-utils/src/MeshPartPayload.cpp | 28 ++++++------ libraries/render-utils/src/MeshPartPayload.h | 18 ++++---- libraries/render-utils/src/Model.cpp | 14 +++--- libraries/render-utils/src/Model.h | 2 +- .../render-utils/src/RenderDeferredTask.cpp | 2 +- .../render-utils/src/RenderPipelines.cpp | 2 +- .../render-utils/src/RenderShadowTask.cpp | 2 +- .../render-utils/src/StencilMaskPass.cpp | 6 +-- libraries/render-utils/src/StencilMaskPass.h | 4 +- libraries/render-utils/src/ZoneRenderer.cpp | 6 +-- .../src/ModelScriptingInterface.cpp | 30 ++++++------- .../src/SceneScriptingInterface.cpp | 12 ++--- .../src/SceneScriptingInterface.h | 20 ++++----- libraries/shared/src/RegisteredMetaTypes.h | 4 +- plugins/openvr/src/ViveControllerManager.h | 2 +- tests/gpu-test/src/TestFbx.h | 2 +- tests/gpu-test/src/TestWindow.cpp | 2 +- tests/gpu-test/src/TestWindow.h | 2 +- .../src/CollisionRenderMeshCacheTests.cpp | 16 +++---- tests/render-perf/src/main.cpp | 6 +-- 71 files changed, 340 insertions(+), 340 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 449b014c13..1cee7ea9f3 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -5465,7 +5465,7 @@ void Application::clearDomainOctreeDetails() { auto skyStage = DependencyManager::get()->getSkyStage(); - skyStage->setBackgroundMode(model::SunSkyStage::SKY_DEFAULT); + skyStage->setBackgroundMode(graphics::SunSkyStage::SKY_DEFAULT); DependencyManager::get()->clearUnusedResources(); DependencyManager::get()->clearUnusedResources(); diff --git a/interface/src/Application.h b/interface/src/Application.h index 6b70e88b89..ddb8ce11e5 100644 --- a/interface/src/Application.h +++ b/interface/src/Application.h @@ -270,7 +270,7 @@ public: void takeSecondaryCameraSnapshot(); void shareSnapshot(const QString& filename, const QUrl& href = QUrl("")); - model::SkyboxPointer getDefaultSkybox() const { return _defaultSkybox; } + graphics::SkyboxPointer getDefaultSkybox() const { return _defaultSkybox; } gpu::TexturePointer getDefaultSkyboxTexture() const { return _defaultSkyboxTexture; } gpu::TexturePointer getDefaultSkyboxAmbientTexture() const { return _defaultSkyboxAmbientTexture; } @@ -667,7 +667,7 @@ private: ConnectionMonitor _connectionMonitor; - model::SkyboxPointer _defaultSkybox { new ProceduralSkybox() } ; + graphics::SkyboxPointer _defaultSkybox { new ProceduralSkybox() } ; gpu::TexturePointer _defaultSkyboxTexture; gpu::TexturePointer _defaultSkyboxAmbientTexture; diff --git a/libraries/entities-renderer/src/RenderableLightEntityItem.cpp b/libraries/entities-renderer/src/RenderableLightEntityItem.cpp index fc33ebc498..4ea293a3da 100644 --- a/libraries/entities-renderer/src/RenderableLightEntityItem.cpp +++ b/libraries/entities-renderer/src/RenderableLightEntityItem.cpp @@ -52,9 +52,9 @@ void LightEntityRenderer::doRenderUpdateAsynchronousTyped(const TypedEntityPoint float exponent = entity->getExponent(); float cutoff = glm::radians(entity->getCutoff()); if (!entity->getIsSpotlight()) { - light->setType(model::Light::POINT); + light->setType(graphics::Light::POINT); } else { - light->setType(model::Light::SPOT); + light->setType(graphics::Light::SPOT); light->setSpotAngle(cutoff); light->setSpotExponent(exponent); diff --git a/libraries/entities-renderer/src/RenderableModelEntityItem.cpp b/libraries/entities-renderer/src/RenderableModelEntityItem.cpp index 86237e75a4..3f42a353d1 100644 --- a/libraries/entities-renderer/src/RenderableModelEntityItem.cpp +++ b/libraries/entities-renderer/src/RenderableModelEntityItem.cpp @@ -558,10 +558,10 @@ void RenderableModelEntityItem::computeShapeInfo(ShapeInfo& shapeInfo) { if (type == SHAPE_TYPE_STATIC_MESH) { // copy into triangleIndices triangleIndices.reserve((int32_t)((gpu::Size)(triangleIndices.size()) + indices.getNumElements())); - gpu::BufferView::Iterator partItr = parts.cbegin(); - while (partItr != parts.cend()) { + gpu::BufferView::Iterator partItr = parts.cbegin(); + while (partItr != parts.cend()) { auto numIndices = partItr->_numIndices; - if (partItr->_topology == model::Mesh::TRIANGLES) { + if (partItr->_topology == graphics::Mesh::TRIANGLES) { // TODO: assert rather than workaround after we start sanitizing FBXMesh higher up //assert(numIndices % TRIANGLE_STRIDE == 0); numIndices -= numIndices % TRIANGLE_STRIDE; // WORKAROUND lack of sanity checking in FBXReader @@ -572,7 +572,7 @@ void RenderableModelEntityItem::computeShapeInfo(ShapeInfo& shapeInfo) { triangleIndices.push_back(*indexItr + meshIndexOffset); ++indexItr; } - } else if (partItr->_topology == model::Mesh::TRIANGLE_STRIP) { + } else if (partItr->_topology == graphics::Mesh::TRIANGLE_STRIP) { // TODO: resurrect assert after we start sanitizing FBXMesh higher up //assert(numIndices > 2); @@ -593,7 +593,7 @@ void RenderableModelEntityItem::computeShapeInfo(ShapeInfo& shapeInfo) { // the rest use previous and next index uint32_t triangleCount = 1; while (indexItr != indexEnd) { - if ((*indexItr) != model::Mesh::PRIMITIVE_RESTART_INDEX) { + if ((*indexItr) != graphics::Mesh::PRIMITIVE_RESTART_INDEX) { if (triangleCount % 2 == 0) { // even triangles use first two indices in order triangleIndices.push_back(*(indexItr - 2) + meshIndexOffset); @@ -613,12 +613,12 @@ void RenderableModelEntityItem::computeShapeInfo(ShapeInfo& shapeInfo) { } } else if (type == SHAPE_TYPE_SIMPLE_COMPOUND) { // for each mesh copy unique part indices, separated by special bogus (flag) index values - gpu::BufferView::Iterator partItr = parts.cbegin(); - while (partItr != parts.cend()) { + gpu::BufferView::Iterator partItr = parts.cbegin(); + while (partItr != parts.cend()) { // collect unique list of indices for this part std::set uniqueIndices; auto numIndices = partItr->_numIndices; - if (partItr->_topology == model::Mesh::TRIANGLES) { + if (partItr->_topology == graphics::Mesh::TRIANGLES) { // TODO: assert rather than workaround after we start sanitizing FBXMesh higher up //assert(numIndices% TRIANGLE_STRIDE == 0); numIndices -= numIndices % TRIANGLE_STRIDE; // WORKAROUND lack of sanity checking in FBXReader @@ -629,7 +629,7 @@ void RenderableModelEntityItem::computeShapeInfo(ShapeInfo& shapeInfo) { uniqueIndices.insert(*indexItr); ++indexItr; } - } else if (partItr->_topology == model::Mesh::TRIANGLE_STRIP) { + } else if (partItr->_topology == graphics::Mesh::TRIANGLE_STRIP) { // TODO: resurrect assert after we start sanitizing FBXMesh higher up //assert(numIndices > TRIANGLE_STRIDE - 1); @@ -644,7 +644,7 @@ void RenderableModelEntityItem::computeShapeInfo(ShapeInfo& shapeInfo) { // the rest use previous and next index uint32_t triangleCount = 1; while (indexItr != indexEnd) { - if ((*indexItr) != model::Mesh::PRIMITIVE_RESTART_INDEX) { + if ((*indexItr) != graphics::Mesh::PRIMITIVE_RESTART_INDEX) { if (triangleCount % 2 == 0) { // EVEN triangles use first two indices in order uniqueIndices.insert(*(indexItr - 2)); @@ -1295,7 +1295,7 @@ void ModelEntityRenderer::doRenderUpdateSynchronousTyped(const ScenePointer& sce ShapeType type = entity->getShapeType(); if (DependencyManager::get()->shouldRenderDebugHulls() && type != SHAPE_TYPE_STATIC_MESH && type != SHAPE_TYPE_NONE) { // NOTE: it is OK if _collisionMeshKey is nullptr - model::MeshPointer mesh = collisionMeshCache.getMesh(_collisionMeshKey); + graphics::MeshPointer mesh = collisionMeshCache.getMesh(_collisionMeshKey); // NOTE: the model will render the collisionGeometry if it has one _model->setCollisionMesh(mesh); } else { @@ -1304,7 +1304,7 @@ void ModelEntityRenderer::doRenderUpdateSynchronousTyped(const ScenePointer& sce collisionMeshCache.releaseMesh(_collisionMeshKey); } // clear model's collision geometry - model::MeshPointer mesh = nullptr; + graphics::MeshPointer mesh = nullptr; _model->setCollisionMesh(mesh); } } diff --git a/libraries/entities-renderer/src/RenderablePolyVoxEntityItem.cpp b/libraries/entities-renderer/src/RenderablePolyVoxEntityItem.cpp index 365ba5189a..b4412e441f 100644 --- a/libraries/entities-renderer/src/RenderablePolyVoxEntityItem.cpp +++ b/libraries/entities-renderer/src/RenderablePolyVoxEntityItem.cpp @@ -1060,7 +1060,7 @@ void RenderablePolyVoxEntityItem::recomputeMesh() { auto entity = std::static_pointer_cast(getThisPointer()); QtConcurrent::run([entity, voxelSurfaceStyle] { - model::MeshPointer mesh(new model::Mesh()); + graphics::MeshPointer mesh(new graphics::Mesh()); // A mesh object to hold the result of surface extraction PolyVox::SurfaceMesh polyVoxMesh; @@ -1122,18 +1122,18 @@ void RenderablePolyVoxEntityItem::recomputeMesh() { sizeof(PolyVox::PositionMaterialNormal), gpu::Element(gpu::VEC3, gpu::FLOAT, gpu::XYZ))); - std::vector parts; - parts.emplace_back(model::Mesh::Part((model::Index)0, // startIndex - (model::Index)vecIndices.size(), // numIndices - (model::Index)0, // baseVertex - model::Mesh::TRIANGLES)); // topology - mesh->setPartBuffer(gpu::BufferView(new gpu::Buffer(parts.size() * sizeof(model::Mesh::Part), + std::vector parts; + parts.emplace_back(graphics::Mesh::Part((graphics::Index)0, // startIndex + (graphics::Index)vecIndices.size(), // numIndices + (graphics::Index)0, // baseVertex + graphics::Mesh::TRIANGLES)); // topology + mesh->setPartBuffer(gpu::BufferView(new gpu::Buffer(parts.size() * sizeof(graphics::Mesh::Part), (gpu::Byte*) parts.data()), gpu::Element::PART_DRAWCALL)); entity->setMesh(mesh); }); } -void RenderablePolyVoxEntityItem::setMesh(model::MeshPointer mesh) { +void RenderablePolyVoxEntityItem::setMesh(graphics::MeshPointer mesh) { // this catches the payload from recomputeMesh bool neighborsNeedUpdate; withWriteLock([&] { @@ -1164,7 +1164,7 @@ void RenderablePolyVoxEntityItem::computeShapeInfoWorker() { PolyVoxSurfaceStyle voxelSurfaceStyle; glm::vec3 voxelVolumeSize; - model::MeshPointer mesh; + graphics::MeshPointer mesh; withReadLock([&] { voxelSurfaceStyle = _voxelSurfaceStyle; @@ -1582,7 +1582,7 @@ void PolyVoxEntityRenderer::doRenderUpdateSynchronousTyped(const ScenePointer& s void PolyVoxEntityRenderer::doRenderUpdateAsynchronousTyped(const TypedEntityPointer& entity) { _lastVoxelToWorldMatrix = entity->voxelToWorldMatrix(); - model::MeshPointer newMesh; + graphics::MeshPointer newMesh; entity->withReadLock([&] { newMesh = entity->_mesh; }); diff --git a/libraries/entities-renderer/src/RenderablePolyVoxEntityItem.h b/libraries/entities-renderer/src/RenderablePolyVoxEntityItem.h index 8dbe1dd0f1..03c7351a59 100644 --- a/libraries/entities-renderer/src/RenderablePolyVoxEntityItem.h +++ b/libraries/entities-renderer/src/RenderablePolyVoxEntityItem.h @@ -104,7 +104,7 @@ public: void forEachVoxelValue(const ivec3& voxelSize, std::function thunk); QByteArray volDataToArray(quint16 voxelXSize, quint16 voxelYSize, quint16 voxelZSize) const; - void setMesh(model::MeshPointer mesh); + void setMesh(graphics::MeshPointer mesh); void setCollisionPoints(ShapeInfo::PointCollection points, AABox box); PolyVox::SimpleVolume* getVolData() { return _volData.get(); } @@ -134,7 +134,7 @@ private: // may not match _voxelVolumeSize. bool _meshDirty { true }; // does collision-shape need to be recomputed? bool _meshReady{ false }; - model::MeshPointer _mesh; + graphics::MeshPointer _mesh; ShapeInfo _shapeInfo; @@ -178,7 +178,7 @@ private: bool _hasTransitioned{ false }; #endif - model::MeshPointer _mesh; + graphics::MeshPointer _mesh; std::array _xyzTextures; glm::vec3 _lastVoxelVolumeSize; glm::mat4 _lastVoxelToWorldMatrix; diff --git a/libraries/entities-renderer/src/RenderableZoneEntityItem.cpp b/libraries/entities-renderer/src/RenderableZoneEntityItem.cpp index 4161b65ead..17cc4d2d4f 100644 --- a/libraries/entities-renderer/src/RenderableZoneEntityItem.cpp +++ b/libraries/entities-renderer/src/RenderableZoneEntityItem.cpp @@ -319,7 +319,7 @@ void ZoneEntityRenderer::updateKeySunFromEntity(const TypedEntityPointer& entity setKeyLightMode((ComponentMode)entity->getKeyLightMode()); const auto& sunLight = editSunLight(); - sunLight->setType(model::Light::SUN); + sunLight->setType(graphics::Light::SUN); sunLight->setPosition(_lastPosition); sunLight->setOrientation(_lastRotation); @@ -333,7 +333,7 @@ void ZoneEntityRenderer::updateAmbientLightFromEntity(const TypedEntityPointer& setAmbientLightMode((ComponentMode)entity->getAmbientLightMode()); const auto& ambientLight = editAmbientLight(); - ambientLight->setType(model::Light::AMBIENT); + ambientLight->setType(graphics::Light::AMBIENT); ambientLight->setPosition(_lastPosition); ambientLight->setOrientation(_lastRotation); @@ -357,23 +357,23 @@ void ZoneEntityRenderer::updateHazeFromEntity(const TypedEntityPointer& entity) haze->setHazeActive(hazeMode == COMPONENT_MODE_ENABLED); haze->setAltitudeBased(_hazeProperties.getHazeAltitudeEffect()); - haze->setHazeRangeFactor(model::Haze::convertHazeRangeToHazeRangeFactor(_hazeProperties.getHazeRange())); + haze->setHazeRangeFactor(graphics::Haze::convertHazeRangeToHazeRangeFactor(_hazeProperties.getHazeRange())); xColor hazeColor = _hazeProperties.getHazeColor(); haze->setHazeColor(glm::vec3(hazeColor.red / 255.0, hazeColor.green / 255.0, hazeColor.blue / 255.0)); xColor hazeGlareColor = _hazeProperties.getHazeGlareColor(); haze->setHazeGlareColor(glm::vec3(hazeGlareColor.red / 255.0, hazeGlareColor.green / 255.0, hazeGlareColor.blue / 255.0)); haze->setHazeEnableGlare(_hazeProperties.getHazeEnableGlare()); - haze->setHazeGlareBlend(model::Haze::convertGlareAngleToPower(_hazeProperties.getHazeGlareAngle())); + haze->setHazeGlareBlend(graphics::Haze::convertGlareAngleToPower(_hazeProperties.getHazeGlareAngle())); float hazeAltitude = _hazeProperties.getHazeCeiling() - _hazeProperties.getHazeBaseRef(); - haze->setHazeAltitudeFactor(model::Haze::convertHazeAltitudeToHazeAltitudeFactor(hazeAltitude)); + haze->setHazeAltitudeFactor(graphics::Haze::convertHazeAltitudeToHazeAltitudeFactor(hazeAltitude)); haze->setHazeBaseReference(_hazeProperties.getHazeBaseRef()); haze->setHazeBackgroundBlend(_hazeProperties.getHazeBackgroundBlend()); haze->setHazeAttenuateKeyLight(_hazeProperties.getHazeAttenuateKeyLight()); - haze->setHazeKeyLightRangeFactor(model::Haze::convertHazeRangeToHazeRangeFactor(_hazeProperties.getHazeKeyLightRange())); - haze->setHazeKeyLightAltitudeFactor(model::Haze::convertHazeAltitudeToHazeAltitudeFactor(_hazeProperties.getHazeKeyLightAltitude())); + haze->setHazeKeyLightRangeFactor(graphics::Haze::convertHazeRangeToHazeRangeFactor(_hazeProperties.getHazeKeyLightRange())); + haze->setHazeKeyLightAltitudeFactor(graphics::Haze::convertHazeAltitudeToHazeAltitudeFactor(_hazeProperties.getHazeKeyLightAltitude())); haze->setZoneTransform(entity->getTransform().getMatrix()); } diff --git a/libraries/entities-renderer/src/RenderableZoneEntityItem.h b/libraries/entities-renderer/src/RenderableZoneEntityItem.h index e1f696ca89..69f0663c06 100644 --- a/libraries/entities-renderer/src/RenderableZoneEntityItem.h +++ b/libraries/entities-renderer/src/RenderableZoneEntityItem.h @@ -63,11 +63,11 @@ private: void setSkyboxColor(const glm::vec3& color); void setProceduralUserData(const QString& userData); - model::LightPointer editSunLight() { _needSunUpdate = true; return _sunLight; } - model::LightPointer editAmbientLight() { _needAmbientUpdate = true; return _ambientLight; } - model::SunSkyStagePointer editBackground() { _needBackgroundUpdate = true; return _background; } - model::SkyboxPointer editSkybox() { return editBackground()->getSkybox(); } - model::HazePointer editHaze() { _needHazeUpdate = true; return _haze; } + graphics::LightPointer editSunLight() { _needSunUpdate = true; return _sunLight; } + graphics::LightPointer editAmbientLight() { _needAmbientUpdate = true; return _ambientLight; } + graphics::SunSkyStagePointer editBackground() { _needBackgroundUpdate = true; return _background; } + graphics::SkyboxPointer editSkybox() { return editBackground()->getSkybox(); } + graphics::HazePointer editHaze() { _needHazeUpdate = true; return _haze; } bool _needsInitialSimulation{ true }; glm::vec3 _lastPosition; @@ -83,10 +83,10 @@ private: #endif LightStagePointer _stage; - const model::LightPointer _sunLight{ std::make_shared() }; - const model::LightPointer _ambientLight{ std::make_shared() }; - const model::SunSkyStagePointer _background{ std::make_shared() }; - const model::HazePointer _haze{ std::make_shared() }; + const graphics::LightPointer _sunLight{ std::make_shared() }; + const graphics::LightPointer _ambientLight{ std::make_shared() }; + const graphics::SunSkyStagePointer _background{ std::make_shared() }; + const graphics::HazePointer _haze{ std::make_shared() }; ComponentMode _keyLightMode { COMPONENT_MODE_INHERIT }; ComponentMode _ambientLightMode { COMPONENT_MODE_INHERIT }; diff --git a/libraries/fbx/src/FBX.h b/libraries/fbx/src/FBX.h index 21f8fe51aa..e40b218344 100644 --- a/libraries/fbx/src/FBX.h +++ b/libraries/fbx/src/FBX.h @@ -183,7 +183,7 @@ public: QString materialID; QString name; QString shadingModel; - model::MaterialPointer _material; + graphics::MaterialPointer _material; FBXTexture normalTexture; FBXTexture albedoTexture; @@ -238,7 +238,7 @@ public: unsigned int meshIndex; // the order the meshes appeared in the object file - model::MeshPointer _mesh; + graphics::MeshPointer _mesh; bool wasCompressed { false }; }; diff --git a/libraries/fbx/src/FBXReader.cpp b/libraries/fbx/src/FBXReader.cpp index 42d25c96ea..4bc5eb1b6d 100644 --- a/libraries/fbx/src/FBXReader.cpp +++ b/libraries/fbx/src/FBXReader.cpp @@ -72,7 +72,7 @@ Extents FBXGeometry::getUnscaledMeshExtents() const { return scaledExtents; } -// TODO: Move to model::Mesh when Sam's ready +// TODO: Move to graphics::Mesh when Sam's ready bool FBXGeometry::convexHullContains(const glm::vec3& point) const { if (!getUnscaledMeshExtents().containsPoint(point)) { return false; diff --git a/libraries/fbx/src/FBXReader_Material.cpp b/libraries/fbx/src/FBXReader_Material.cpp index ef6496cd10..4aa3044934 100644 --- a/libraries/fbx/src/FBXReader_Material.cpp +++ b/libraries/fbx/src/FBXReader_Material.cpp @@ -279,7 +279,7 @@ void FBXReader::consolidateFBXMaterials(const QVariantHash& mapping) { } // Finally create the true material representation - material._material = std::make_shared(); + material._material = std::make_shared(); // Emissive color is the mix of emissiveColor with emissiveFactor auto emissive = material.emissiveColor * (isMaterialLambert ? 1.0f : material.emissiveFactor); // In lambert there is not emissiveFactor @@ -293,7 +293,7 @@ void FBXReader::consolidateFBXMaterials(const QVariantHash& mapping) { material._material->setRoughness(material.roughness); material._material->setMetallic(material.metallic); } else { - material._material->setRoughness(model::Material::shininessToRoughness(material.shininess)); + material._material->setRoughness(graphics::Material::shininessToRoughness(material.shininess)); float metallic = std::max(material.specularColor.x, std::max(material.specularColor.y, material.specularColor.z)); material._material->setMetallic(metallic); diff --git a/libraries/fbx/src/FBXReader_Mesh.cpp b/libraries/fbx/src/FBXReader_Mesh.cpp index 309c421052..bc7daa98f4 100644 --- a/libraries/fbx/src/FBXReader_Mesh.cpp +++ b/libraries/fbx/src/FBXReader_Mesh.cpp @@ -584,7 +584,7 @@ void FBXReader::buildModelMesh(FBXMesh& extractedMesh, const QString& url) { } FBXMesh& fbxMesh = extractedMesh; - model::MeshPointer mesh(new model::Mesh()); + graphics::MeshPointer mesh(new graphics::Mesh()); // Grab the vertices in a buffer auto vb = std::make_shared(); @@ -721,45 +721,45 @@ void FBXReader::buildModelMesh(FBXMesh& extractedMesh, const QString& url) { if (normalsSize) { mesh->addAttribute(gpu::Stream::NORMAL, - model::BufferView(attribBuffer, normalsOffset, normalsAndTangentsSize, + graphics::BufferView(attribBuffer, normalsOffset, normalsAndTangentsSize, normalsAndTangentsStride, FBX_NORMAL_ELEMENT)); mesh->addAttribute(gpu::Stream::TANGENT, - model::BufferView(attribBuffer, tangentsOffset, normalsAndTangentsSize, + graphics::BufferView(attribBuffer, tangentsOffset, normalsAndTangentsSize, normalsAndTangentsStride, FBX_NORMAL_ELEMENT)); } if (colorsSize) { mesh->addAttribute(gpu::Stream::COLOR, - model::BufferView(attribBuffer, colorsOffset, colorsSize, FBX_COLOR_ELEMENT)); + graphics::BufferView(attribBuffer, colorsOffset, colorsSize, FBX_COLOR_ELEMENT)); } if (texCoordsSize) { mesh->addAttribute(gpu::Stream::TEXCOORD, - model::BufferView( attribBuffer, texCoordsOffset, texCoordsSize, + graphics::BufferView( attribBuffer, texCoordsOffset, texCoordsSize, gpu::Element(gpu::VEC2, gpu::HALF, gpu::UV))); } if (texCoords1Size) { mesh->addAttribute( gpu::Stream::TEXCOORD1, - model::BufferView(attribBuffer, texCoords1Offset, texCoords1Size, + graphics::BufferView(attribBuffer, texCoords1Offset, texCoords1Size, gpu::Element(gpu::VEC2, gpu::HALF, gpu::UV))); } else if (texCoordsSize) { mesh->addAttribute(gpu::Stream::TEXCOORD1, - model::BufferView(attribBuffer, texCoordsOffset, texCoordsSize, + graphics::BufferView(attribBuffer, texCoordsOffset, texCoordsSize, gpu::Element(gpu::VEC2, gpu::HALF, gpu::UV))); } if (clusterIndicesSize) { if (fbxMesh.clusters.size() < UINT8_MAX) { mesh->addAttribute(gpu::Stream::SKIN_CLUSTER_INDEX, - model::BufferView(attribBuffer, clusterIndicesOffset, clusterIndicesSize, + graphics::BufferView(attribBuffer, clusterIndicesOffset, clusterIndicesSize, gpu::Element(gpu::VEC4, gpu::UINT8, gpu::XYZW))); } else { mesh->addAttribute(gpu::Stream::SKIN_CLUSTER_INDEX, - model::BufferView(attribBuffer, clusterIndicesOffset, clusterIndicesSize, + graphics::BufferView(attribBuffer, clusterIndicesOffset, clusterIndicesSize, gpu::Element(gpu::VEC4, gpu::UINT16, gpu::XYZW))); } } if (clusterWeightsSize) { mesh->addAttribute(gpu::Stream::SKIN_CLUSTER_WEIGHT, - model::BufferView(attribBuffer, clusterWeightsOffset, clusterWeightsSize, + graphics::BufferView(attribBuffer, clusterWeightsOffset, clusterWeightsSize, gpu::Element(gpu::VEC4, gpu::NUINT16, gpu::XYZW))); } @@ -780,12 +780,12 @@ void FBXReader::buildModelMesh(FBXMesh& extractedMesh, const QString& url) { int indexNum = 0; int offset = 0; - std::vector< model::Mesh::Part > parts; + std::vector< graphics::Mesh::Part > parts; if (extractedMesh.parts.size() > 1) { indexNum = 0; } foreach(const FBXMeshPart& part, extractedMesh.parts) { - model::Mesh::Part modelPart(indexNum, 0, 0, model::Mesh::TRIANGLES); + graphics::Mesh::Part modelPart(indexNum, 0, 0, graphics::Mesh::TRIANGLES); if (part.quadTrianglesIndices.size()) { indexBuffer->setSubData(offset, @@ -813,7 +813,7 @@ void FBXReader::buildModelMesh(FBXMesh& extractedMesh, const QString& url) { if (parts.size()) { auto pb = std::make_shared(); - pb->setData(parts.size() * sizeof(model::Mesh::Part), (const gpu::Byte*) parts.data()); + pb->setData(parts.size() * sizeof(graphics::Mesh::Part), (const gpu::Byte*) parts.data()); gpu::BufferView pbv(pb, gpu::Element(gpu::VEC4, gpu::UINT32, gpu::XYZW)); mesh->setPartBuffer(pbv); } else { @@ -821,7 +821,7 @@ void FBXReader::buildModelMesh(FBXMesh& extractedMesh, const QString& url) { return; } - // model::Box box = + // graphics::Box box = mesh->evalPartBound(0); extractedMesh._mesh = mesh; diff --git a/libraries/fbx/src/GLTFReader.cpp b/libraries/fbx/src/GLTFReader.cpp index c8501688ac..0c04b3d733 100644 --- a/libraries/fbx/src/GLTFReader.cpp +++ b/libraries/fbx/src/GLTFReader.cpp @@ -748,7 +748,7 @@ bool GLTFReader::buildGeometry(FBXGeometry& geometry, const QUrl& url) { QString& matid = materialIDs[i]; geometry.materials[matid] = FBXMaterial(); FBXMaterial& fbxMaterial = geometry.materials[matid]; - fbxMaterial._material = std::make_shared(); + fbxMaterial._material = std::make_shared(); setFBXMaterial(fbxMaterial, _file.materials[i]); } diff --git a/libraries/fbx/src/OBJReader.cpp b/libraries/fbx/src/OBJReader.cpp index 7fb916efde..ba93a49cb9 100644 --- a/libraries/fbx/src/OBJReader.cpp +++ b/libraries/fbx/src/OBJReader.cpp @@ -750,8 +750,8 @@ FBXGeometry* OBJReader::readOBJ(QByteArray& model, const QVariantHash& mapping, objMaterial.opacity); FBXMaterial& fbxMaterial = geometry.materials[materialID]; fbxMaterial.materialID = materialID; - fbxMaterial._material = std::make_shared(); - model::MaterialPointer modelMaterial = fbxMaterial._material; + fbxMaterial._material = std::make_shared(); + graphics::MaterialPointer modelMaterial = fbxMaterial._material; if (!objMaterial.diffuseTextureFilename.isEmpty()) { fbxMaterial.albedoTexture.filename = objMaterial.diffuseTextureFilename; @@ -763,7 +763,7 @@ FBXGeometry* OBJReader::readOBJ(QByteArray& model, const QVariantHash& mapping, modelMaterial->setEmissive(fbxMaterial.emissiveColor); modelMaterial->setAlbedo(fbxMaterial.diffuseColor); modelMaterial->setMetallic(glm::length(fbxMaterial.specularColor)); - modelMaterial->setRoughness(model::Material::shininessToRoughness(fbxMaterial.shininess)); + modelMaterial->setRoughness(graphics::Material::shininessToRoughness(fbxMaterial.shininess)); if (fbxMaterial.opacity <= 0.0f) { modelMaterial->setOpacity(1.0f); diff --git a/libraries/fbx/src/OBJWriter.cpp b/libraries/fbx/src/OBJWriter.cpp index 42ef2be646..4441ae6649 100644 --- a/libraries/fbx/src/OBJWriter.cpp +++ b/libraries/fbx/src/OBJWriter.cpp @@ -105,13 +105,13 @@ bool writeOBJToTextStream(QTextStream& out, QList meshes) { const gpu::BufferView& partBuffer = mesh->getPartBuffer(); const gpu::BufferView& indexBuffer = mesh->getIndexBuffer(); - model::Index partCount = (model::Index)mesh->getNumParts(); + graphics::Index partCount = (graphics::Index)mesh->getNumParts(); for (int partIndex = 0; partIndex < partCount; partIndex++) { - const model::Mesh::Part& part = partBuffer.get(partIndex); + const graphics::Mesh::Part& part = partBuffer.get(partIndex); out << "g part-" << nth++ << "\n"; - // model::Mesh::TRIANGLES + // graphics::Mesh::TRIANGLES // TODO -- handle other formats gpu::BufferView::Iterator indexItr = indexBuffer.cbegin(); indexItr += part._startIndex; diff --git a/libraries/fbx/src/OBJWriter.h b/libraries/fbx/src/OBJWriter.h index 7f8b0ddbed..536e8cf837 100644 --- a/libraries/fbx/src/OBJWriter.h +++ b/libraries/fbx/src/OBJWriter.h @@ -17,7 +17,7 @@ #include #include -using MeshPointer = std::shared_ptr; +using MeshPointer = std::shared_ptr; bool writeOBJToTextStream(QTextStream& out, QList meshes); bool writeOBJToFile(QString path, QList meshes); diff --git a/libraries/graphics/src/graphics/Asset.cpp b/libraries/graphics/src/graphics/Asset.cpp index 84d7560257..ef5f010b4e 100644 --- a/libraries/graphics/src/graphics/Asset.cpp +++ b/libraries/graphics/src/graphics/Asset.cpp @@ -10,7 +10,7 @@ // #include "Asset.h" -using namespace model; +using namespace graphics; Asset::Asset() { } diff --git a/libraries/graphics/src/graphics/Asset.h b/libraries/graphics/src/graphics/Asset.h index c2e4ff3d3a..86d98c1a69 100644 --- a/libraries/graphics/src/graphics/Asset.h +++ b/libraries/graphics/src/graphics/Asset.h @@ -17,7 +17,7 @@ #include "Material.h" #include "Geometry.h" -namespace model { +namespace graphics { template class Table { diff --git a/libraries/graphics/src/graphics/Forward.h b/libraries/graphics/src/graphics/Forward.h index 7f728b44fc..95d2d73099 100644 --- a/libraries/graphics/src/graphics/Forward.h +++ b/libraries/graphics/src/graphics/Forward.h @@ -11,7 +11,7 @@ #ifndef hifi_model_Forward_h #define hifi_model_Forward_h -namespace model { +namespace graphics { class Mesh; using MeshPointer = std::shared_ptr; } diff --git a/libraries/graphics/src/graphics/Geometry.cpp b/libraries/graphics/src/graphics/Geometry.cpp index 930449c5e6..ba5afcbc62 100755 --- a/libraries/graphics/src/graphics/Geometry.cpp +++ b/libraries/graphics/src/graphics/Geometry.cpp @@ -13,7 +13,7 @@ #include -using namespace model; +using namespace graphics; Mesh::Mesh() : _vertexBuffer(gpu::Element(gpu::VEC3, gpu::FLOAT, gpu::XYZ)), @@ -137,7 +137,7 @@ Box Mesh::evalPartsBound(int partStart, int partEnd) const { } -model::MeshPointer Mesh::map(std::function vertexFunc, +graphics::MeshPointer Mesh::map(std::function vertexFunc, std::function colorFunc, std::function normalFunc, std::function indexFunc) const { @@ -223,7 +223,7 @@ model::MeshPointer Mesh::map(std::function vertexFunc, indexDataCursor += sizeof(index); } - model::MeshPointer result(new model::Mesh()); + graphics::MeshPointer result(new graphics::Mesh()); gpu::Element vertexElement = gpu::Element(gpu::VEC3, gpu::FLOAT, gpu::XYZ); gpu::Buffer* resultVertexBuffer = new gpu::Buffer(vertexSize, resultVertexData.get()); @@ -252,12 +252,12 @@ model::MeshPointer Mesh::map(std::function vertexFunc, // TODO -- shouldn't assume just one part - std::vector parts; - parts.emplace_back(model::Mesh::Part((model::Index)0, // startIndex - (model::Index)result->getNumIndices(), // numIndices - (model::Index)0, // baseVertex - model::Mesh::TRIANGLES)); // topology - result->setPartBuffer(gpu::BufferView(new gpu::Buffer(parts.size() * sizeof(model::Mesh::Part), + std::vector parts; + parts.emplace_back(graphics::Mesh::Part((graphics::Index)0, // startIndex + (graphics::Index)result->getNumIndices(), // numIndices + (graphics::Index)0, // baseVertex + graphics::Mesh::TRIANGLES)); // topology + result->setPartBuffer(gpu::BufferView(new gpu::Buffer(parts.size() * sizeof(graphics::Mesh::Part), (gpu::Byte*) parts.data()), gpu::Element::PART_DRAWCALL)); return result; @@ -350,9 +350,9 @@ MeshPointer Mesh::createIndexedTriangles_P3F(uint32_t numVertices, uint32_t numI } - std::vector parts; - parts.push_back(model::Mesh::Part(0, numIndices, 0, model::Mesh::TRIANGLES)); - mesh->setPartBuffer(gpu::BufferView(new gpu::Buffer(parts.size() * sizeof(model::Mesh::Part), (gpu::Byte*) parts.data()), gpu::Element::PART_DRAWCALL)); + std::vector parts; + parts.push_back(graphics::Mesh::Part(0, numIndices, 0, graphics::Mesh::TRIANGLES)); + mesh->setPartBuffer(gpu::BufferView(new gpu::Buffer(parts.size() * sizeof(graphics::Mesh::Part), (gpu::Byte*) parts.data()), gpu::Element::PART_DRAWCALL)); return mesh; } diff --git a/libraries/graphics/src/graphics/Geometry.h b/libraries/graphics/src/graphics/Geometry.h index 510cf54742..cd64a7c185 100755 --- a/libraries/graphics/src/graphics/Geometry.h +++ b/libraries/graphics/src/graphics/Geometry.h @@ -18,7 +18,7 @@ #include #include -namespace model { +namespace graphics { typedef gpu::BufferView::Index Index; typedef gpu::BufferView BufferView; typedef AABox Box; @@ -40,7 +40,7 @@ public: typedef gpu::Stream::Format VertexFormat; typedef std::map< Slot, BufferView > BufferViewMap; - typedef model::Vec3 Vec3; + typedef graphics::Vec3 Vec3; Mesh(); Mesh(const Mesh& mesh); diff --git a/libraries/graphics/src/graphics/Haze.cpp b/libraries/graphics/src/graphics/Haze.cpp index dd07afc6d6..c788bc57db 100644 --- a/libraries/graphics/src/graphics/Haze.cpp +++ b/libraries/graphics/src/graphics/Haze.cpp @@ -12,7 +12,7 @@ #include #include "Haze.h" -using namespace model; +using namespace graphics; const float Haze::INITIAL_HAZE_RANGE{ 1000.0f }; const float Haze::INITIAL_HAZE_HEIGHT{ 200.0f }; diff --git a/libraries/graphics/src/graphics/Haze.h b/libraries/graphics/src/graphics/Haze.h index 260f5f0097..608449a97e 100644 --- a/libraries/graphics/src/graphics/Haze.h +++ b/libraries/graphics/src/graphics/Haze.h @@ -17,7 +17,7 @@ #include "Transform.h" #include "NumericalConstants.h" -namespace model { +namespace graphics { // Haze range is defined here as the range the visibility is reduced by 95% // Haze altitude is defined here as the altitude (above 0) that the haze is reduced by 95% diff --git a/libraries/graphics/src/graphics/Light.cpp b/libraries/graphics/src/graphics/Light.cpp index 8b6aae7759..cb5209d4cf 100755 --- a/libraries/graphics/src/graphics/Light.cpp +++ b/libraries/graphics/src/graphics/Light.cpp @@ -10,7 +10,7 @@ // #include "Light.h" -using namespace model; +using namespace graphics; Light::Light() { updateLightRadius(); diff --git a/libraries/graphics/src/graphics/Light.h b/libraries/graphics/src/graphics/Light.h index 58d5c0cf2a..360e3f224e 100755 --- a/libraries/graphics/src/graphics/Light.h +++ b/libraries/graphics/src/graphics/Light.h @@ -19,7 +19,7 @@ #include "gpu/Resource.h" #include "gpu/Texture.h" -namespace model { +namespace graphics { typedef gpu::BufferView UniformBufferView; typedef gpu::TextureView TextureView; typedef glm::vec3 Vec3; diff --git a/libraries/graphics/src/graphics/Material.cpp b/libraries/graphics/src/graphics/Material.cpp index 0cfb9916ac..ea5bd331c9 100755 --- a/libraries/graphics/src/graphics/Material.cpp +++ b/libraries/graphics/src/graphics/Material.cpp @@ -12,7 +12,7 @@ #include "TextureMap.h" -using namespace model; +using namespace graphics; using namespace gpu; Material::Material() : diff --git a/libraries/graphics/src/graphics/Material.h b/libraries/graphics/src/graphics/Material.h index 6a2b1c2bee..cfbfaa61ea 100755 --- a/libraries/graphics/src/graphics/Material.h +++ b/libraries/graphics/src/graphics/Material.h @@ -20,7 +20,7 @@ #include -namespace model { +namespace graphics { class TextureMap; typedef std::shared_ptr< TextureMap > TextureMapPointer; diff --git a/libraries/graphics/src/graphics/Skybox.cpp b/libraries/graphics/src/graphics/Skybox.cpp index feb9fb86b7..6fb7226089 100755 --- a/libraries/graphics/src/graphics/Skybox.cpp +++ b/libraries/graphics/src/graphics/Skybox.cpp @@ -18,7 +18,7 @@ #include "skybox_vert.h" #include "skybox_frag.h" -using namespace model; +using namespace graphics; Skybox::Skybox() { Schema schema; diff --git a/libraries/graphics/src/graphics/Skybox.h b/libraries/graphics/src/graphics/Skybox.h index 99155bdd98..d06989a457 100755 --- a/libraries/graphics/src/graphics/Skybox.h +++ b/libraries/graphics/src/graphics/Skybox.h @@ -19,7 +19,7 @@ class ViewFrustum; namespace gpu { class Batch; } -namespace model { +namespace graphics { typedef glm::vec3 Color; diff --git a/libraries/graphics/src/graphics/Stage.cpp b/libraries/graphics/src/graphics/Stage.cpp index 3a300858fe..312ece6889 100644 --- a/libraries/graphics/src/graphics/Stage.cpp +++ b/libraries/graphics/src/graphics/Stage.cpp @@ -15,7 +15,7 @@ #include #include -using namespace model; +using namespace graphics; void EarthSunModel::updateAll() const { diff --git a/libraries/graphics/src/graphics/Stage.h b/libraries/graphics/src/graphics/Stage.h index 65c7b016d6..55f6145ee0 100644 --- a/libraries/graphics/src/graphics/Stage.h +++ b/libraries/graphics/src/graphics/Stage.h @@ -16,7 +16,7 @@ #include "Light.h" #include "Skybox.h" -namespace model { +namespace graphics { typedef glm::dvec3 Vec3d; typedef glm::dvec4 Vec4d; diff --git a/libraries/graphics/src/graphics/TextureMap.cpp b/libraries/graphics/src/graphics/TextureMap.cpp index 7a4eb6391e..e2f24d68ff 100755 --- a/libraries/graphics/src/graphics/TextureMap.cpp +++ b/libraries/graphics/src/graphics/TextureMap.cpp @@ -10,7 +10,7 @@ // #include "TextureMap.h" -using namespace model; +using namespace graphics; using namespace gpu; void TextureMap::setTextureSource(TextureSourcePointer& textureSource) { diff --git a/libraries/graphics/src/graphics/TextureMap.h b/libraries/graphics/src/graphics/TextureMap.h index 268c3daef8..1678d9df98 100755 --- a/libraries/graphics/src/graphics/TextureMap.h +++ b/libraries/graphics/src/graphics/TextureMap.h @@ -15,7 +15,7 @@ #include "Transform.h" -namespace model { +namespace graphics { class TextureMap { public: diff --git a/libraries/model-networking/src/model-networking/ModelCache.cpp b/libraries/model-networking/src/model-networking/ModelCache.cpp index 6a14e6d6b7..07f7283bfa 100644 --- a/libraries/model-networking/src/model-networking/ModelCache.cpp +++ b/libraries/model-networking/src/model-networking/ModelCache.cpp @@ -516,13 +516,13 @@ QUrl NetworkMaterial::getTextureUrl(const QUrl& baseUrl, const FBXTexture& textu } } -model::TextureMapPointer NetworkMaterial::fetchTextureMap(const QUrl& baseUrl, const FBXTexture& fbxTexture, +graphics::TextureMapPointer NetworkMaterial::fetchTextureMap(const QUrl& baseUrl, const FBXTexture& fbxTexture, image::TextureUsage::Type type, MapChannel channel) { const auto url = getTextureUrl(baseUrl, fbxTexture); const auto texture = DependencyManager::get()->getTexture(url, type, fbxTexture.content, fbxTexture.maxNumPixels); _textures[channel] = Texture { fbxTexture.name, texture }; - auto map = std::make_shared(); + auto map = std::make_shared(); if (texture) { map->setTextureSource(texture->_textureSource); } @@ -531,18 +531,18 @@ model::TextureMapPointer NetworkMaterial::fetchTextureMap(const QUrl& baseUrl, c return map; } -model::TextureMapPointer NetworkMaterial::fetchTextureMap(const QUrl& url, image::TextureUsage::Type type, MapChannel channel) { +graphics::TextureMapPointer NetworkMaterial::fetchTextureMap(const QUrl& url, image::TextureUsage::Type type, MapChannel channel) { const auto texture = DependencyManager::get()->getTexture(url, type); _textures[channel].texture = texture; - auto map = std::make_shared(); + auto map = std::make_shared(); map->setTextureSource(texture->_textureSource); return map; } NetworkMaterial::NetworkMaterial(const FBXMaterial& material, const QUrl& textureBaseUrl) : - model::Material(*material._material) + graphics::Material(*material._material) { _textures = Textures(MapChannel::NUM_MAP_CHANNELS); if (!material.albedoTexture.filename.isEmpty()) { diff --git a/libraries/model-networking/src/model-networking/ModelCache.h b/libraries/model-networking/src/model-networking/ModelCache.h index 5c49ec683a..f650b3f2eb 100644 --- a/libraries/model-networking/src/model-networking/ModelCache.h +++ b/libraries/model-networking/src/model-networking/ModelCache.h @@ -38,7 +38,7 @@ public: Geometry(const Geometry& geometry); // Immutable over lifetime - using GeometryMeshes = std::vector>; + using GeometryMeshes = std::vector>; using GeometryMeshParts = std::vector>; // Mutable, but must retain structure of vector @@ -157,9 +157,9 @@ private: virtual ~ModelCache() = default; }; -class NetworkMaterial : public model::Material { +class NetworkMaterial : public graphics::Material { public: - using MapChannel = model::Material::MapChannel; + using MapChannel = graphics::Material::MapChannel; NetworkMaterial(const FBXMaterial& material, const QUrl& textureBaseUrl); @@ -185,9 +185,9 @@ protected: private: // Helpers for the ctors QUrl getTextureUrl(const QUrl& baseUrl, const FBXTexture& fbxTexture); - model::TextureMapPointer fetchTextureMap(const QUrl& baseUrl, const FBXTexture& fbxTexture, + graphics::TextureMapPointer fetchTextureMap(const QUrl& baseUrl, const FBXTexture& fbxTexture, image::TextureUsage::Type type, MapChannel channel); - model::TextureMapPointer fetchTextureMap(const QUrl& url, image::TextureUsage::Type type, MapChannel channel); + graphics::TextureMapPointer fetchTextureMap(const QUrl& url, image::TextureUsage::Type type, MapChannel channel); Transform _albedoTransform; Transform _lightmapTransform; diff --git a/libraries/physics/src/CollisionRenderMeshCache.cpp b/libraries/physics/src/CollisionRenderMeshCache.cpp index 40a8a4aff9..6f66b9af10 100644 --- a/libraries/physics/src/CollisionRenderMeshCache.cpp +++ b/libraries/physics/src/CollisionRenderMeshCache.cpp @@ -21,7 +21,7 @@ const int32_t MAX_HULL_INDICES = 6 * MAX_HULL_POINTS; const int32_t MAX_HULL_NORMALS = MAX_HULL_INDICES; float tempVertices[MAX_HULL_NORMALS]; -model::Index tempIndexBuffer[MAX_HULL_INDICES]; +graphics::Index tempIndexBuffer[MAX_HULL_INDICES]; bool copyShapeToMesh(const btTransform& transform, const btConvexShape* shape, gpu::BufferView& vertices, gpu::BufferView& indices, gpu::BufferView& parts, @@ -40,21 +40,21 @@ bool copyShapeToMesh(const btTransform& transform, const btConvexShape* shape, assert(numHullVertices <= MAX_HULL_POINTS); { // new part - model::Mesh::Part part; - part._startIndex = (model::Index)indices.getNumElements(); - part._numIndices = (model::Index)numHullIndices; + graphics::Mesh::Part part; + part._startIndex = (graphics::Index)indices.getNumElements(); + part._numIndices = (graphics::Index)numHullIndices; // FIXME: the render code cannot handle the case where part._baseVertex != 0 //part._baseVertex = vertices.getNumElements(); // DOES NOT WORK part._baseVertex = 0; - gpu::BufferView::Size numBytes = sizeof(model::Mesh::Part); + gpu::BufferView::Size numBytes = sizeof(graphics::Mesh::Part); const gpu::Byte* data = reinterpret_cast(&part); parts._buffer->append(numBytes, data); parts._size = parts._buffer->getSize(); } const int32_t SIZE_OF_VEC3 = 3 * sizeof(float); - model::Index indexOffset = (model::Index)vertices.getNumElements(); + graphics::Index indexOffset = (graphics::Index)vertices.getNumElements(); { // new indices const uint32_t* hullIndices = hull.getIndexPointer(); @@ -64,7 +64,7 @@ bool copyShapeToMesh(const btTransform& transform, const btConvexShape* shape, tempIndexBuffer[i] = hullIndices[i] + indexOffset; } const gpu::Byte* data = reinterpret_cast(tempIndexBuffer); - gpu::BufferView::Size numBytes = (gpu::BufferView::Size)(sizeof(model::Index) * numHullIndices); + gpu::BufferView::Size numBytes = (gpu::BufferView::Size)(sizeof(graphics::Index) * numHullIndices); indices._buffer->append(numBytes, data); indices._size = indices._buffer->getSize(); } @@ -105,8 +105,8 @@ bool copyShapeToMesh(const btTransform& transform, const btConvexShape* shape, return true; } -model::MeshPointer createMeshFromShape(const void* pointer) { - model::MeshPointer mesh; +graphics::MeshPointer createMeshFromShape(const void* pointer) { + graphics::MeshPointer mesh; if (!pointer) { return mesh; } @@ -147,7 +147,7 @@ model::MeshPointer createMeshFromShape(const void* pointer) { } } if (numSuccesses > 0) { - mesh = std::make_shared(); + mesh = std::make_shared(); mesh->setVertexBuffer(vertices); mesh->setIndexBuffer(indices); mesh->setPartBuffer(parts); @@ -167,8 +167,8 @@ CollisionRenderMeshCache::~CollisionRenderMeshCache() { _pendingGarbage.clear(); } -model::MeshPointer CollisionRenderMeshCache::getMesh(CollisionRenderMeshCache::Key key) { - model::MeshPointer mesh; +graphics::MeshPointer CollisionRenderMeshCache::getMesh(CollisionRenderMeshCache::Key key) { + graphics::MeshPointer mesh; if (key) { CollisionMeshMap::const_iterator itr = _meshMap.find(key); if (itr == _meshMap.end()) { diff --git a/libraries/physics/src/CollisionRenderMeshCache.h b/libraries/physics/src/CollisionRenderMeshCache.h index 64f161e229..c5b643c0cc 100644 --- a/libraries/physics/src/CollisionRenderMeshCache.h +++ b/libraries/physics/src/CollisionRenderMeshCache.h @@ -27,7 +27,7 @@ public: ~CollisionRenderMeshCache(); /// \return pointer to geometry - model::MeshPointer getMesh(Key key); + graphics::MeshPointer getMesh(Key key); /// \return true if geometry was found and released bool releaseMesh(Key key); @@ -40,7 +40,7 @@ public: bool hasMesh(Key key) const { return _meshMap.find(key) == _meshMap.end(); } private: - using CollisionMeshMap = std::unordered_map; + using CollisionMeshMap = std::unordered_map; CollisionMeshMap _meshMap; std::vector _pendingGarbage; }; diff --git a/libraries/procedural/src/procedural/ProceduralSkybox.cpp b/libraries/procedural/src/procedural/ProceduralSkybox.cpp index 60cb4d8fc4..f0c60e2101 100644 --- a/libraries/procedural/src/procedural/ProceduralSkybox.cpp +++ b/libraries/procedural/src/procedural/ProceduralSkybox.cpp @@ -18,7 +18,7 @@ #include #include -ProceduralSkybox::ProceduralSkybox() : model::Skybox() { +ProceduralSkybox::ProceduralSkybox() : graphics::Skybox() { _procedural._vertexSource = skybox_vert; _procedural._fragmentSource = skybox_frag; // Adjust the pipeline state for background using the stencil test diff --git a/libraries/procedural/src/procedural/ProceduralSkybox.h b/libraries/procedural/src/procedural/ProceduralSkybox.h index 14481a57c7..5db1078a5f 100644 --- a/libraries/procedural/src/procedural/ProceduralSkybox.h +++ b/libraries/procedural/src/procedural/ProceduralSkybox.h @@ -17,7 +17,7 @@ #include "Procedural.h" -class ProceduralSkybox: public model::Skybox { +class ProceduralSkybox: public graphics::Skybox { public: ProceduralSkybox(); diff --git a/libraries/render-utils/src/BackgroundStage.cpp b/libraries/render-utils/src/BackgroundStage.cpp index 2d2c0ed150..493c28d840 100644 --- a/libraries/render-utils/src/BackgroundStage.cpp +++ b/libraries/render-utils/src/BackgroundStage.cpp @@ -64,8 +64,8 @@ void DrawBackgroundStage::run(const render::RenderContextPointer& renderContext, auto backgroundStage = renderContext->_scene->getStage(); assert(backgroundStage); - model::SunSkyStagePointer background; - model::SkyboxPointer skybox; + graphics::SunSkyStagePointer background; + graphics::SkyboxPointer skybox; if (backgroundStage->_currentFrame._backgrounds.size()) { auto backgroundId = backgroundStage->_currentFrame._backgrounds.front(); auto background = backgroundStage->getBackground(backgroundId); @@ -76,7 +76,7 @@ void DrawBackgroundStage::run(const render::RenderContextPointer& renderContext, /* auto backgroundMode = skyStage->getBackgroundMode(); switch (backgroundMode) { - case model::SunSkyStage::SKY_DEFAULT: { + case graphics::SunSkyStage::SKY_DEFAULT: { auto scene = DependencyManager::get()->getStage(); auto sceneKeyLight = scene->getKeyLight(); @@ -88,7 +88,7 @@ void DrawBackgroundStage::run(const render::RenderContextPointer& renderContext, // fall through: render a skybox (if available), or the defaults (if requested) } - case model::SunSkyStage::SKY_BOX: {*/ + case graphics::SunSkyStage::SKY_BOX: {*/ if (skybox && !skybox->empty()) { PerformanceTimer perfTimer("skybox"); auto args = renderContext->args; @@ -118,7 +118,7 @@ void DrawBackgroundStage::run(const render::RenderContextPointer& renderContext, // fall through: render defaults (if requested) // } /* - case model::SunSkyStage::SKY_DEFAULT_AMBIENT_TEXTURE: { + case graphics::SunSkyStage::SKY_DEFAULT_AMBIENT_TEXTURE: { if (Menu::getInstance()->isOptionChecked(MenuOption::DefaultSkybox)) { auto scene = DependencyManager::get()->getStage(); auto sceneKeyLight = scene->getKeyLight(); diff --git a/libraries/render-utils/src/BackgroundStage.h b/libraries/render-utils/src/BackgroundStage.h index b890a8cb28..db876b1993 100644 --- a/libraries/render-utils/src/BackgroundStage.h +++ b/libraries/render-utils/src/BackgroundStage.h @@ -30,8 +30,8 @@ public: static const Index INVALID_INDEX; static bool isIndexInvalid(Index index) { return index == INVALID_INDEX; } - using BackgroundPointer = model::SunSkyStagePointer; - using Backgrounds = render::indexed_container::IndexedPointerVector; + using BackgroundPointer = graphics::SunSkyStagePointer; + using Backgrounds = render::indexed_container::IndexedPointerVector; using BackgroundMap = std::unordered_map; using BackgroundIndices = std::vector; diff --git a/libraries/render-utils/src/DeferredLightingEffect.cpp b/libraries/render-utils/src/DeferredLightingEffect.cpp index 81a33f17e3..b4fc2fd32d 100644 --- a/libraries/render-utils/src/DeferredLightingEffect.cpp +++ b/libraries/render-utils/src/DeferredLightingEffect.cpp @@ -103,13 +103,13 @@ void DeferredLightingEffect::init() { void DeferredLightingEffect::setupKeyLightBatch(const RenderArgs* args, gpu::Batch& batch, int lightBufferUnit, int ambientBufferUnit, int skyboxCubemapUnit) { PerformanceTimer perfTimer("DLE->setupBatch()"); - model::LightPointer keySunLight; + graphics::LightPointer keySunLight; auto lightStage = args->_scene->getStage(); if (lightStage) { keySunLight = lightStage->getCurrentKeyLight(); } - model::LightPointer keyAmbiLight; + graphics::LightPointer keyAmbiLight; if (lightStage) { keyAmbiLight = lightStage->getCurrentAmbientLight(); } @@ -229,9 +229,9 @@ static void loadLightProgram(const char* vertSource, const char* fragSource, boo #include -model::MeshPointer DeferredLightingEffect::getPointLightMesh() { +graphics::MeshPointer DeferredLightingEffect::getPointLightMesh() { if (!_pointLightMesh) { - _pointLightMesh = std::make_shared(); + _pointLightMesh = std::make_shared(); // let's use a icosahedron auto solid = geometry::icosahedron(); @@ -256,19 +256,19 @@ model::MeshPointer DeferredLightingEffect::getPointLightMesh() { delete[] indexData; - std::vector parts; - parts.push_back(model::Mesh::Part(0, nbIndices, 0, model::Mesh::TRIANGLES)); - parts.push_back(model::Mesh::Part(0, nbIndices, 0, model::Mesh::LINE_STRIP)); // outline version + std::vector parts; + parts.push_back(graphics::Mesh::Part(0, nbIndices, 0, graphics::Mesh::TRIANGLES)); + parts.push_back(graphics::Mesh::Part(0, nbIndices, 0, graphics::Mesh::LINE_STRIP)); // outline version - _pointLightMesh->setPartBuffer(gpu::BufferView(new gpu::Buffer(parts.size() * sizeof(model::Mesh::Part), (gpu::Byte*) parts.data()), gpu::Element::PART_DRAWCALL)); + _pointLightMesh->setPartBuffer(gpu::BufferView(new gpu::Buffer(parts.size() * sizeof(graphics::Mesh::Part), (gpu::Byte*) parts.data()), gpu::Element::PART_DRAWCALL)); } return _pointLightMesh; } -model::MeshPointer DeferredLightingEffect::getSpotLightMesh() { +graphics::MeshPointer DeferredLightingEffect::getSpotLightMesh() { if (!_spotLightMesh) { - _spotLightMesh = std::make_shared(); + _spotLightMesh = std::make_shared(); int slices = 16; int rings = 3; @@ -353,12 +353,12 @@ model::MeshPointer DeferredLightingEffect::getSpotLightMesh() { delete[] indexData; - std::vector parts; - parts.push_back(model::Mesh::Part(0, indices, 0, model::Mesh::TRIANGLES)); - parts.push_back(model::Mesh::Part(0, indices, 0, model::Mesh::LINE_STRIP)); // outline version + std::vector parts; + parts.push_back(graphics::Mesh::Part(0, indices, 0, graphics::Mesh::TRIANGLES)); + parts.push_back(graphics::Mesh::Part(0, indices, 0, graphics::Mesh::LINE_STRIP)); // outline version - _spotLightMesh->setPartBuffer(gpu::BufferView(new gpu::Buffer(parts.size() * sizeof(model::Mesh::Part), (gpu::Byte*) parts.data()), gpu::Element::PART_DRAWCALL)); + _spotLightMesh->setPartBuffer(gpu::BufferView(new gpu::Buffer(parts.size() * sizeof(graphics::Mesh::Part), (gpu::Byte*) parts.data()), gpu::Element::PART_DRAWCALL)); } return _spotLightMesh; } @@ -439,7 +439,7 @@ void RenderDeferredSetup::run(const render::RenderContextPointer& renderContext, const DeferredFrameTransformPointer& frameTransform, const DeferredFramebufferPointer& deferredFramebuffer, const LightingModelPointer& lightingModel, - const model::HazePointer& haze, + const graphics::HazePointer& haze, const SurfaceGeometryFramebufferPointer& surfaceGeometryFramebuffer, const AmbientOcclusionFramebufferPointer& ambientOcclusionFramebuffer, const SubsurfaceScatteringResourcePointer& subsurfaceScatteringResource) { @@ -513,7 +513,7 @@ void RenderDeferredSetup::run(const render::RenderContextPointer& renderContext, auto keyLight = lightAndShadow.first; - model::LightPointer keyAmbientLight; + graphics::LightPointer keyAmbientLight; if (lightStage && lightStage->_currentFrame._ambientLights.size()) { keyAmbientLight = lightStage->getLight(lightStage->_currentFrame._ambientLights.front()); } @@ -744,12 +744,12 @@ void DefaultLightingSetup::run(const RenderContextPointer& renderContext) { if (lightStage) { // Allocate a default global light directional and ambient - auto lp = std::make_shared(); - lp->setType(model::Light::SUN); + auto lp = std::make_shared(); + lp->setType(graphics::Light::SUN); lp->setDirection(glm::vec3(-1.0f)); lp->setColor(glm::vec3(1.0f)); lp->setIntensity(1.0f); - lp->setType(model::Light::SUN); + lp->setType(graphics::Light::SUN); lp->setAmbientSpherePreset(gpu::SphericalHarmonics::Preset::OLD_TOWN_SQUARE); lp->setAmbientIntensity(0.5f); @@ -771,7 +771,7 @@ void DefaultLightingSetup::run(const RenderContextPointer& renderContext) { auto backgroundStage = renderContext->_scene->getStage(); if (backgroundStage) { - auto background = std::make_shared(); + auto background = std::make_shared(); background->setSkybox(_defaultSkybox); // capture deault background @@ -786,7 +786,7 @@ void DefaultLightingSetup::run(const RenderContextPointer& renderContext) { auto hazeStage = renderContext->_scene->getStage(); if (hazeStage) { - auto haze = std::make_shared(); + auto haze = std::make_shared(); _defaultHaze = haze; _defaultHazeID = hazeStage->addHaze(_defaultHaze); diff --git a/libraries/render-utils/src/DeferredLightingEffect.h b/libraries/render-utils/src/DeferredLightingEffect.h index 8d0fc619e5..6d2c0a6819 100644 --- a/libraries/render-utils/src/DeferredLightingEffect.h +++ b/libraries/render-utils/src/DeferredLightingEffect.h @@ -61,10 +61,10 @@ private: bool _shadowMapEnabled{ false }; bool _ambientOcclusionEnabled{ false }; - model::MeshPointer _pointLightMesh; - model::MeshPointer getPointLightMesh(); - model::MeshPointer _spotLightMesh; - model::MeshPointer getSpotLightMesh(); + graphics::MeshPointer _pointLightMesh; + graphics::MeshPointer getPointLightMesh(); + graphics::MeshPointer _spotLightMesh; + graphics::MeshPointer getSpotLightMesh(); gpu::PipelinePointer _directionalSkyboxLight; gpu::PipelinePointer _directionalAmbientSphereLight; @@ -121,7 +121,7 @@ public: const DeferredFrameTransformPointer& frameTransform, const DeferredFramebufferPointer& deferredFramebuffer, const LightingModelPointer& lightingModel, - const model::HazePointer& haze, + const graphics::HazePointer& haze, const SurfaceGeometryFramebufferPointer& surfaceGeometryFramebuffer, const AmbientOcclusionFramebufferPointer& ambientOcclusionFramebuffer, const SubsurfaceScatteringResourcePointer& subsurfaceScatteringResource); @@ -158,7 +158,7 @@ class RenderDeferred { public: using Inputs = render::VaryingSet8 < DeferredFrameTransformPointer, DeferredFramebufferPointer, LightingModelPointer, SurfaceGeometryFramebufferPointer, - AmbientOcclusionFramebufferPointer, SubsurfaceScatteringResourcePointer, LightClustersPointer, model::HazePointer>; + AmbientOcclusionFramebufferPointer, SubsurfaceScatteringResourcePointer, LightClustersPointer, graphics::HazePointer>; using Config = RenderDeferredConfig; using JobModel = render::Job::ModelI; @@ -184,13 +184,13 @@ public: void run(const render::RenderContextPointer& renderContext); protected: - model::LightPointer _defaultLight; + graphics::LightPointer _defaultLight; LightStage::Index _defaultLightID{ LightStage::INVALID_INDEX }; - model::SunSkyStagePointer _defaultBackground; + graphics::SunSkyStagePointer _defaultBackground; BackgroundStage::Index _defaultBackgroundID{ BackgroundStage::INVALID_INDEX }; - model::HazePointer _defaultHaze{ nullptr }; + graphics::HazePointer _defaultHaze{ nullptr }; HazeStage::Index _defaultHazeID{ HazeStage::INVALID_INDEX }; - model::SkyboxPointer _defaultSkybox { new ProceduralSkybox() }; + graphics::SkyboxPointer _defaultSkybox { new ProceduralSkybox() }; gpu::TexturePointer _defaultSkyboxTexture; gpu::TexturePointer _defaultSkyboxAmbientTexture; }; diff --git a/libraries/render-utils/src/DrawHaze.cpp b/libraries/render-utils/src/DrawHaze.cpp index da07f5bd9b..64a106a09c 100644 --- a/libraries/render-utils/src/DrawHaze.cpp +++ b/libraries/render-utils/src/DrawHaze.cpp @@ -78,12 +78,12 @@ void HazeConfig::setHazeBackgroundBlend(const float value) { } MakeHaze::MakeHaze() { - _haze = std::make_shared(); + _haze = std::make_shared(); } void MakeHaze::configure(const Config& config) { _haze->setHazeColor(config.hazeColor); - _haze->setHazeGlareBlend(model::Haze::convertGlareAngleToPower(config.hazeGlareAngle)); + _haze->setHazeGlareBlend(graphics::Haze::convertGlareAngleToPower(config.hazeGlareAngle)); _haze->setHazeGlareColor(config.hazeGlareColor); _haze->setHazeBaseReference(config.hazeBaseReference); @@ -94,16 +94,16 @@ void MakeHaze::configure(const Config& config) { _haze->setModulateColorActive(config.isModulateColorActive); _haze->setHazeEnableGlare(config.isHazeEnableGlare); - _haze->setHazeRangeFactor(model::Haze::convertHazeRangeToHazeRangeFactor(config.hazeRange)); - _haze->setHazeAltitudeFactor(model::Haze::convertHazeAltitudeToHazeAltitudeFactor(config.hazeHeight)); + _haze->setHazeRangeFactor(graphics::Haze::convertHazeRangeToHazeRangeFactor(config.hazeRange)); + _haze->setHazeAltitudeFactor(graphics::Haze::convertHazeAltitudeToHazeAltitudeFactor(config.hazeHeight)); - _haze->setHazeKeyLightRangeFactor(model::Haze::convertHazeRangeToHazeRangeFactor(config.hazeKeyLightRange)); - _haze->setHazeKeyLightAltitudeFactor(model::Haze::convertHazeAltitudeToHazeAltitudeFactor(config.hazeKeyLightAltitude)); + _haze->setHazeKeyLightRangeFactor(graphics::Haze::convertHazeRangeToHazeRangeFactor(config.hazeKeyLightRange)); + _haze->setHazeKeyLightAltitudeFactor(graphics::Haze::convertHazeAltitudeToHazeAltitudeFactor(config.hazeKeyLightAltitude)); _haze->setHazeBackgroundBlend(config.hazeBackgroundBlend); } -void MakeHaze::run(const render::RenderContextPointer& renderContext, model::HazePointer& haze) { +void MakeHaze::run(const render::RenderContextPointer& renderContext, graphics::HazePointer& haze) { haze = _haze; } @@ -168,7 +168,7 @@ void DrawHaze::run(const render::RenderContextPointer& renderContext, const Inpu auto hazeStage = args->_scene->getStage(); if (hazeStage && hazeStage->_currentFrame._hazes.size() > 0) { - model::HazePointer hazePointer = hazeStage->getHaze(hazeStage->_currentFrame._hazes.front()); + graphics::HazePointer hazePointer = hazeStage->getHaze(hazeStage->_currentFrame._hazes.front()); if (hazePointer) { batch.setUniformBuffer(HazeEffect_ParamsSlot, hazePointer->getHazeParametersBuffer()); } else { @@ -181,7 +181,7 @@ void DrawHaze::run(const render::RenderContextPointer& renderContext, const Inpu auto lightStage = args->_scene->getStage(); if (lightStage) { - model::LightPointer keyLight; + graphics::LightPointer keyLight; keyLight = lightStage->getCurrentKeyLight(); if (keyLight) { batch.setUniformBuffer(HazeEffect_LightingMapSlot, keyLight->getLightSchemaBuffer()); diff --git a/libraries/render-utils/src/DrawHaze.h b/libraries/render-utils/src/DrawHaze.h index 3ad42b23aa..e7d4e15d77 100644 --- a/libraries/render-utils/src/DrawHaze.h +++ b/libraries/render-utils/src/DrawHaze.h @@ -51,11 +51,11 @@ class MakeHazeConfig : public render::Job::Config { public: MakeHazeConfig() : render::Job::Config() {} - glm::vec3 hazeColor{ model::Haze::INITIAL_HAZE_COLOR }; - float hazeGlareAngle{ model::Haze::INITIAL_HAZE_GLARE_ANGLE }; + glm::vec3 hazeColor{ graphics::Haze::INITIAL_HAZE_COLOR }; + float hazeGlareAngle{ graphics::Haze::INITIAL_HAZE_GLARE_ANGLE }; - glm::vec3 hazeGlareColor{ model::Haze::INITIAL_HAZE_GLARE_COLOR }; - float hazeBaseReference{ model::Haze::INITIAL_HAZE_BASE_REFERENCE }; + glm::vec3 hazeGlareColor{ graphics::Haze::INITIAL_HAZE_GLARE_COLOR }; + float hazeBaseReference{ graphics::Haze::INITIAL_HAZE_BASE_REFERENCE }; bool isHazeActive{ false }; bool isAltitudeBased{ false }; @@ -63,13 +63,13 @@ public: bool isModulateColorActive{ false }; bool isHazeEnableGlare{ false }; - float hazeRange{ model::Haze::INITIAL_HAZE_RANGE }; - float hazeHeight{ model::Haze::INITIAL_HAZE_HEIGHT }; + float hazeRange{ graphics::Haze::INITIAL_HAZE_RANGE }; + float hazeHeight{ graphics::Haze::INITIAL_HAZE_HEIGHT }; - float hazeKeyLightRange{ model::Haze::INITIAL_KEY_LIGHT_RANGE }; - float hazeKeyLightAltitude{ model::Haze::INITIAL_KEY_LIGHT_ALTITUDE }; + float hazeKeyLightRange{ graphics::Haze::INITIAL_KEY_LIGHT_RANGE }; + float hazeKeyLightAltitude{ graphics::Haze::INITIAL_KEY_LIGHT_ALTITUDE }; - float hazeBackgroundBlend{ model::Haze::INITIAL_HAZE_BACKGROUND_BLEND }; + float hazeBackgroundBlend{ graphics::Haze::INITIAL_HAZE_BACKGROUND_BLEND }; public slots: void setHazeColor(const glm::vec3 value) { hazeColor = value; emit dirty(); } @@ -99,15 +99,15 @@ signals: class MakeHaze { public: using Config = MakeHazeConfig; - using JobModel = render::Job::ModelO; + using JobModel = render::Job::ModelO; MakeHaze(); void configure(const Config& config); - void run(const render::RenderContextPointer& renderContext, model::HazePointer& haze); + void run(const render::RenderContextPointer& renderContext, graphics::HazePointer& haze); private: - model::HazePointer _haze; + graphics::HazePointer _haze; }; class HazeConfig : public render::Job::Config { @@ -115,11 +115,11 @@ public: HazeConfig() : render::Job::Config(true) {} // attributes - glm::vec3 hazeColor{ model::Haze::INITIAL_HAZE_COLOR }; - float hazeGlareAngle{ model::Haze::INITIAL_HAZE_GLARE_ANGLE }; + glm::vec3 hazeColor{ graphics::Haze::INITIAL_HAZE_COLOR }; + float hazeGlareAngle{ graphics::Haze::INITIAL_HAZE_GLARE_ANGLE }; - glm::vec3 hazeGlareColor{ model::Haze::INITIAL_HAZE_GLARE_COLOR }; - float hazeBaseReference{ model::Haze::INITIAL_HAZE_BASE_REFERENCE }; + glm::vec3 hazeGlareColor{ graphics::Haze::INITIAL_HAZE_GLARE_COLOR }; + float hazeBaseReference{ graphics::Haze::INITIAL_HAZE_BASE_REFERENCE }; bool isHazeActive{ false }; // Setting this to true will set haze to on bool isAltitudeBased{ false }; @@ -127,13 +127,13 @@ public: bool isModulateColorActive{ false }; bool isHazeEnableGlare{ false }; - float hazeRange{ model::Haze::INITIAL_HAZE_RANGE }; - float hazeHeight{ model::Haze::INITIAL_HAZE_HEIGHT }; + float hazeRange{ graphics::Haze::INITIAL_HAZE_RANGE }; + float hazeHeight{ graphics::Haze::INITIAL_HAZE_HEIGHT }; - float hazeKeyLightRange{ model::Haze::INITIAL_KEY_LIGHT_RANGE }; - float hazeKeyLightAltitude{ model::Haze::INITIAL_KEY_LIGHT_ALTITUDE }; + float hazeKeyLightRange{ graphics::Haze::INITIAL_KEY_LIGHT_RANGE }; + float hazeKeyLightAltitude{ graphics::Haze::INITIAL_KEY_LIGHT_ALTITUDE }; - float hazeBackgroundBlend{ model::Haze::INITIAL_HAZE_BACKGROUND_BLEND }; + float hazeBackgroundBlend{ graphics::Haze::INITIAL_HAZE_BACKGROUND_BLEND }; // methods void setHazeColor(const glm::vec3 value); @@ -159,7 +159,7 @@ public: class DrawHaze { public: - using Inputs = render::VaryingSet5; + using Inputs = render::VaryingSet5; using Config = HazeConfig; using JobModel = render::Job::ModelI; diff --git a/libraries/render-utils/src/HazeStage.cpp b/libraries/render-utils/src/HazeStage.cpp index 016282d16f..e56b715b8c 100644 --- a/libraries/render-utils/src/HazeStage.cpp +++ b/libraries/render-utils/src/HazeStage.cpp @@ -17,12 +17,12 @@ std::string HazeStage::_stageName { "HAZE_STAGE"}; const HazeStage::Index HazeStage::INVALID_INDEX { render::indexed_container::INVALID_INDEX }; FetchHazeStage::FetchHazeStage() { - _haze = std::make_shared(); + _haze = std::make_shared(); } void FetchHazeStage::configure(const Config& config) { _haze->setHazeColor(config.hazeColor); - _haze->setHazeGlareBlend(model::Haze::convertGlareAngleToPower(config.hazeGlareAngle)); + _haze->setHazeGlareBlend(graphics::Haze::convertGlareAngleToPower(config.hazeGlareAngle)); _haze->setHazeGlareColor(config.hazeGlareColor); _haze->setHazeBaseReference(config.hazeBaseReference); @@ -33,11 +33,11 @@ void FetchHazeStage::configure(const Config& config) { _haze->setModulateColorActive(config.isModulateColorActive); _haze->setHazeEnableGlare(config.isHazeEnableGlare); - _haze->setHazeRangeFactor(model::Haze::convertHazeRangeToHazeRangeFactor(config.hazeRange)); - _haze->setHazeAltitudeFactor(model::Haze::convertHazeAltitudeToHazeAltitudeFactor(config.hazeHeight)); + _haze->setHazeRangeFactor(graphics::Haze::convertHazeRangeToHazeRangeFactor(config.hazeRange)); + _haze->setHazeAltitudeFactor(graphics::Haze::convertHazeAltitudeToHazeAltitudeFactor(config.hazeHeight)); - _haze->setHazeKeyLightRangeFactor(model::Haze::convertHazeRangeToHazeRangeFactor(config.hazeKeyLightRange)); - _haze->setHazeKeyLightAltitudeFactor(model::Haze::convertHazeAltitudeToHazeAltitudeFactor(config.hazeKeyLightAltitude)); + _haze->setHazeKeyLightRangeFactor(graphics::Haze::convertHazeRangeToHazeRangeFactor(config.hazeKeyLightRange)); + _haze->setHazeKeyLightAltitudeFactor(graphics::Haze::convertHazeAltitudeToHazeAltitudeFactor(config.hazeKeyLightAltitude)); _haze->setHazeBackgroundBlend(config.hazeBackgroundBlend); } @@ -86,7 +86,7 @@ void HazeStageSetup::run(const render::RenderContextPointer& renderContext) { } } -void FetchHazeStage::run(const render::RenderContextPointer& renderContext, model::HazePointer& haze) { +void FetchHazeStage::run(const render::RenderContextPointer& renderContext, graphics::HazePointer& haze) { auto hazeStage = renderContext->_scene->getStage(); assert(hazeStage); diff --git a/libraries/render-utils/src/HazeStage.h b/libraries/render-utils/src/HazeStage.h index 9e729f1ef9..8f137cb280 100644 --- a/libraries/render-utils/src/HazeStage.h +++ b/libraries/render-utils/src/HazeStage.h @@ -31,8 +31,8 @@ public: static const Index INVALID_INDEX; static bool isIndexInvalid(Index index) { return index == INVALID_INDEX; } - using HazePointer = model::HazePointer; - using Hazes = render::indexed_container::IndexedPointerVector; + using HazePointer = graphics::HazePointer; + using Hazes = render::indexed_container::IndexedPointerVector; using HazeMap = std::unordered_map; using HazeIndices = std::vector; @@ -106,11 +106,11 @@ class FetchHazeConfig : public render::Job::Config { public: FetchHazeConfig() : render::Job::Config() {} - glm::vec3 hazeColor{ model::Haze::INITIAL_HAZE_COLOR }; - float hazeGlareAngle{ model::Haze::INITIAL_HAZE_GLARE_ANGLE }; + glm::vec3 hazeColor{ graphics::Haze::INITIAL_HAZE_COLOR }; + float hazeGlareAngle{ graphics::Haze::INITIAL_HAZE_GLARE_ANGLE }; - glm::vec3 hazeGlareColor{ model::Haze::INITIAL_HAZE_GLARE_COLOR }; - float hazeBaseReference{ model::Haze::INITIAL_HAZE_BASE_REFERENCE }; + glm::vec3 hazeGlareColor{ graphics::Haze::INITIAL_HAZE_GLARE_COLOR }; + float hazeBaseReference{ graphics::Haze::INITIAL_HAZE_BASE_REFERENCE }; bool isHazeActive{ false }; bool isAltitudeBased{ false }; @@ -118,13 +118,13 @@ public: bool isModulateColorActive{ false }; bool isHazeEnableGlare{ false }; - float hazeRange{ model::Haze::INITIAL_HAZE_RANGE }; - float hazeHeight{ model::Haze::INITIAL_HAZE_HEIGHT }; + float hazeRange{ graphics::Haze::INITIAL_HAZE_RANGE }; + float hazeHeight{ graphics::Haze::INITIAL_HAZE_HEIGHT }; - float hazeKeyLightRange{ model::Haze::INITIAL_KEY_LIGHT_RANGE }; - float hazeKeyLightAltitude{ model::Haze::INITIAL_KEY_LIGHT_ALTITUDE }; + float hazeKeyLightRange{ graphics::Haze::INITIAL_KEY_LIGHT_RANGE }; + float hazeKeyLightAltitude{ graphics::Haze::INITIAL_KEY_LIGHT_ALTITUDE }; - float hazeBackgroundBlend{ model::Haze::INITIAL_HAZE_BACKGROUND_BLEND }; + float hazeBackgroundBlend{ graphics::Haze::INITIAL_HAZE_BACKGROUND_BLEND }; public slots: void setHazeColor(const glm::vec3 value) { hazeColor = value; emit dirty(); } @@ -154,15 +154,15 @@ signals: class FetchHazeStage { public: using Config = FetchHazeConfig; - using JobModel = render::Job::ModelO; + using JobModel = render::Job::ModelO; FetchHazeStage(); void configure(const Config& config); - void run(const render::RenderContextPointer& renderContext, model::HazePointer& haze); + void run(const render::RenderContextPointer& renderContext, graphics::HazePointer& haze); private: - model::HazePointer _haze; + graphics::HazePointer _haze; gpu::PipelinePointer _hazePipeline; }; #endif diff --git a/libraries/render-utils/src/LightPayload.cpp b/libraries/render-utils/src/LightPayload.cpp index afa17bee19..09334faa13 100644 --- a/libraries/render-utils/src/LightPayload.cpp +++ b/libraries/render-utils/src/LightPayload.cpp @@ -40,7 +40,7 @@ namespace render { } LightPayload::LightPayload() : - _light(std::make_shared()) + _light(std::make_shared()) { } @@ -109,7 +109,7 @@ namespace render { } KeyLightPayload::KeyLightPayload() : -_light(std::make_shared()) +_light(std::make_shared()) { } diff --git a/libraries/render-utils/src/LightPayload.h b/libraries/render-utils/src/LightPayload.h index a3032ccd90..44b79ce10c 100644 --- a/libraries/render-utils/src/LightPayload.h +++ b/libraries/render-utils/src/LightPayload.h @@ -26,14 +26,14 @@ public: ~LightPayload(); void render(RenderArgs* args); - model::LightPointer editLight() { _needUpdate = true; return _light; } + graphics::LightPointer editLight() { _needUpdate = true; return _light; } render::Item::Bound& editBound() { _needUpdate = true; return _bound; } void setVisible(bool visible) { _isVisible = visible; } bool isVisible() const { return _isVisible; } protected: - model::LightPointer _light; + graphics::LightPointer _light; render::Item::Bound _bound; LightStagePointer _stage; LightStage::Index _index { LightStage::INVALID_INDEX }; @@ -56,7 +56,7 @@ public: ~KeyLightPayload(); void render(RenderArgs* args); - model::LightPointer editLight() { _needUpdate = true; return _light; } + graphics::LightPointer editLight() { _needUpdate = true; return _light; } render::Item::Bound& editBound() { _needUpdate = true; return _bound; } void setVisible(bool visible) { _isVisible = visible; } @@ -69,7 +69,7 @@ public: bool _pendingAmbientTexture { false }; protected: - model::LightPointer _light; + graphics::LightPointer _light; render::Item::Bound _bound; LightStagePointer _stage; LightStage::Index _index { LightStage::INVALID_INDEX }; diff --git a/libraries/render-utils/src/LightStage.cpp b/libraries/render-utils/src/LightStage.cpp index 42b161ba74..f146cd6e0a 100644 --- a/libraries/render-utils/src/LightStage.cpp +++ b/libraries/render-utils/src/LightStage.cpp @@ -29,32 +29,32 @@ const LightStage::Index LightStage::INVALID_INDEX { render::indexed_container::I LightStage::LightStage() { // Add off lights - const LightPointer ambientOffLight { std::make_shared() }; + const LightPointer ambientOffLight { std::make_shared() }; ambientOffLight->setAmbientIntensity(0.0f); - ambientOffLight->setColor(model::Vec3(0.0)); + ambientOffLight->setColor(graphics::Vec3(0.0)); ambientOffLight->setIntensity(0.0f); - ambientOffLight->setType(model::Light::Type::AMBIENT); + ambientOffLight->setType(graphics::Light::Type::AMBIENT); _ambientOffLightId = addLight(ambientOffLight); - const LightPointer pointOffLight { std::make_shared() }; + const LightPointer pointOffLight { std::make_shared() }; pointOffLight->setAmbientIntensity(0.0f); - pointOffLight->setColor(model::Vec3(0.0)); + pointOffLight->setColor(graphics::Vec3(0.0)); pointOffLight->setIntensity(0.0f); - pointOffLight->setType(model::Light::Type::POINT); + pointOffLight->setType(graphics::Light::Type::POINT); _pointOffLightId = addLight(pointOffLight); - const LightPointer spotOffLight { std::make_shared() }; + const LightPointer spotOffLight { std::make_shared() }; spotOffLight->setAmbientIntensity(0.0f); - spotOffLight->setColor(model::Vec3(0.0)); + spotOffLight->setColor(graphics::Vec3(0.0)); spotOffLight->setIntensity(0.0f); - spotOffLight->setType(model::Light::Type::SPOT); + spotOffLight->setType(graphics::Light::Type::SPOT); _spotOffLightId = addLight(spotOffLight); - const LightPointer sunOffLight { std::make_shared() }; + const LightPointer sunOffLight { std::make_shared() }; sunOffLight->setAmbientIntensity(0.0f); - sunOffLight->setColor(model::Vec3(0.0)); + sunOffLight->setColor(graphics::Vec3(0.0)); sunOffLight->setIntensity(0.0f); - sunOffLight->setType(model::Light::Type::SUN); + sunOffLight->setType(graphics::Light::Type::SUN); _sunOffLightId = addLight(sunOffLight); // Set default light to the off ambient light (until changed) @@ -123,7 +123,7 @@ float LightStage::Shadow::Cascade::computeFarDistance(const ViewFrustum& viewFru return far; } -LightStage::Shadow::Shadow(model::LightPointer light, float maxDistance, unsigned int cascadeCount) : +LightStage::Shadow::Shadow(graphics::LightPointer light, float maxDistance, unsigned int cascadeCount) : _light{ light } { cascadeCount = std::min(cascadeCount, (unsigned int)SHADOW_CASCADE_MAX_COUNT); Schema schema; @@ -404,14 +404,14 @@ LightStage::Index LightStage::getShadowId(Index lightId) const { } void LightStage::updateLightArrayBuffer(Index lightId) { - auto lightSize = sizeof(model::Light::LightSchema); + auto lightSize = sizeof(graphics::Light::LightSchema); if (!_lightArrayBuffer) { _lightArrayBuffer = std::make_shared(lightSize); } assert(checkLightId(lightId)); - if (lightId > (Index)_lightArrayBuffer->getNumTypedElements()) { + if (lightId > (Index)_lightArrayBuffer->getNumTypedElements()) { _lightArrayBuffer->resize(lightSize * (lightId + 10)); } @@ -419,7 +419,7 @@ void LightStage::updateLightArrayBuffer(Index lightId) { auto light = _lights._elements[lightId]; if (light) { const auto& lightSchema = light->getLightSchemaBuffer().get(); - _lightArrayBuffer->setSubData(lightId, lightSchema); + _lightArrayBuffer->setSubData(lightId, lightSchema); } else { // this should not happen ? } diff --git a/libraries/render-utils/src/LightStage.h b/libraries/render-utils/src/LightStage.h index 8db5c19950..d1a8680706 100644 --- a/libraries/render-utils/src/LightStage.h +++ b/libraries/render-utils/src/LightStage.h @@ -35,8 +35,8 @@ public: static const Index INVALID_INDEX; static bool isIndexInvalid(Index index) { return index == INVALID_INDEX; } - using LightPointer = model::LightPointer; - using Lights = render::indexed_container::IndexedPointerVector; + using LightPointer = graphics::LightPointer; + using Lights = render::indexed_container::IndexedPointerVector; using LightMap = std::unordered_map; using LightIndices = std::vector; @@ -75,7 +75,7 @@ public: float left, float right, float bottom, float top, float viewMaxShadowDistance) const; }; - Shadow(model::LightPointer light, float maxDistance, unsigned int cascadeCount = 1); + Shadow(graphics::LightPointer light, float maxDistance, unsigned int cascadeCount = 1); void setKeylightFrustum(const ViewFrustum& viewFrustum, float nearDepth = 1.0f, float farDepth = 1000.0f); @@ -91,7 +91,7 @@ public: float getMaxDistance() const { return _maxDistance; } void setMaxDistance(float value); - const model::LightPointer& getLight() const { return _light; } + const graphics::LightPointer& getLight() const { return _light; } protected: @@ -101,7 +101,7 @@ public: static const glm::mat4 _biasMatrix; - model::LightPointer _light; + graphics::LightPointer _light; float _maxDistance; Cascades _cascades; @@ -165,12 +165,12 @@ public: Frame() {} void clear() { _pointLights.clear(); _spotLights.clear(); _sunLights.clear(); _ambientLights.clear(); } - void pushLight(LightStage::Index index, model::Light::Type type) { + void pushLight(LightStage::Index index, graphics::Light::Type type) { switch (type) { - case model::Light::POINT: { pushPointLight(index); break; } - case model::Light::SPOT: { pushSpotLight(index); break; } - case model::Light::SUN: { pushSunLight(index); break; } - case model::Light::AMBIENT: { pushAmbientLight(index); break; } + case graphics::Light::POINT: { pushPointLight(index); break; } + case graphics::Light::SPOT: { pushSpotLight(index); break; } + case graphics::Light::SUN: { pushSunLight(index); break; } + case graphics::Light::AMBIENT: { pushAmbientLight(index); break; } default: { break; } } } diff --git a/libraries/render-utils/src/MeshPartPayload.cpp b/libraries/render-utils/src/MeshPartPayload.cpp index d6ab2ff416..c506887fc4 100644 --- a/libraries/render-utils/src/MeshPartPayload.cpp +++ b/libraries/render-utils/src/MeshPartPayload.cpp @@ -45,17 +45,17 @@ template <> void payloadRender(const MeshPartPayload::Pointer& payload, RenderAr } } -MeshPartPayload::MeshPartPayload(const std::shared_ptr& mesh, int partIndex, model::MaterialPointer material) { +MeshPartPayload::MeshPartPayload(const std::shared_ptr& mesh, int partIndex, graphics::MaterialPointer material) { updateMeshPart(mesh, partIndex); updateMaterial(material); } -void MeshPartPayload::updateMeshPart(const std::shared_ptr& drawMesh, int partIndex) { +void MeshPartPayload::updateMeshPart(const std::shared_ptr& drawMesh, int partIndex) { _drawMesh = drawMesh; if (_drawMesh) { auto vertexFormat = _drawMesh->getVertexFormat(); _hasColorAttrib = vertexFormat->hasAttribute(gpu::Stream::COLOR); - _drawPart = _drawMesh->getPartBuffer().get(partIndex); + _drawPart = _drawMesh->getPartBuffer().get(partIndex); _localBound = _drawMesh->evalPartBound(partIndex); } } @@ -67,7 +67,7 @@ void MeshPartPayload::updateTransform(const Transform& transform, const Transfor _worldBound.transform(_drawTransform); } -void MeshPartPayload::updateMaterial(model::MaterialPointer drawMaterial) { +void MeshPartPayload::updateMaterial(graphics::MaterialPointer drawMaterial) { _drawMaterial = drawMaterial; } @@ -90,7 +90,7 @@ Item::Bound MeshPartPayload::getBound() const { } ShapeKey MeshPartPayload::getShapeKey() const { - model::MaterialKey drawMaterialKey; + graphics::MaterialKey drawMaterialKey; if (_drawMaterial) { drawMaterialKey = _drawMaterial->getKey(); } @@ -156,7 +156,7 @@ void MeshPartPayload::bindMaterial(gpu::Batch& batch, const ShapePipeline::Locat // Albedo if (materialKey.isAlbedoMap()) { - auto itr = textureMaps.find(model::MaterialKey::ALBEDO_MAP); + auto itr = textureMaps.find(graphics::MaterialKey::ALBEDO_MAP); if (itr != textureMaps.end() && itr->second->isDefined()) { batch.setResourceTexture(ShapePipeline::Slot::ALBEDO, itr->second->getTextureView()); } else { @@ -166,7 +166,7 @@ void MeshPartPayload::bindMaterial(gpu::Batch& batch, const ShapePipeline::Locat // Roughness map if (materialKey.isRoughnessMap()) { - auto itr = textureMaps.find(model::MaterialKey::ROUGHNESS_MAP); + auto itr = textureMaps.find(graphics::MaterialKey::ROUGHNESS_MAP); if (itr != textureMaps.end() && itr->second->isDefined()) { batch.setResourceTexture(ShapePipeline::Slot::MAP::ROUGHNESS, itr->second->getTextureView()); @@ -178,7 +178,7 @@ void MeshPartPayload::bindMaterial(gpu::Batch& batch, const ShapePipeline::Locat // Normal map if (materialKey.isNormalMap()) { - auto itr = textureMaps.find(model::MaterialKey::NORMAL_MAP); + auto itr = textureMaps.find(graphics::MaterialKey::NORMAL_MAP); if (itr != textureMaps.end() && itr->second->isDefined()) { batch.setResourceTexture(ShapePipeline::Slot::MAP::NORMAL, itr->second->getTextureView()); @@ -190,7 +190,7 @@ void MeshPartPayload::bindMaterial(gpu::Batch& batch, const ShapePipeline::Locat // Metallic map if (materialKey.isMetallicMap()) { - auto itr = textureMaps.find(model::MaterialKey::METALLIC_MAP); + auto itr = textureMaps.find(graphics::MaterialKey::METALLIC_MAP); if (itr != textureMaps.end() && itr->second->isDefined()) { batch.setResourceTexture(ShapePipeline::Slot::MAP::METALLIC, itr->second->getTextureView()); @@ -202,7 +202,7 @@ void MeshPartPayload::bindMaterial(gpu::Batch& batch, const ShapePipeline::Locat // Occlusion map if (materialKey.isOcclusionMap()) { - auto itr = textureMaps.find(model::MaterialKey::OCCLUSION_MAP); + auto itr = textureMaps.find(graphics::MaterialKey::OCCLUSION_MAP); if (itr != textureMaps.end() && itr->second->isDefined()) { batch.setResourceTexture(ShapePipeline::Slot::MAP::OCCLUSION, itr->second->getTextureView()); @@ -214,7 +214,7 @@ void MeshPartPayload::bindMaterial(gpu::Batch& batch, const ShapePipeline::Locat // Scattering map if (materialKey.isScatteringMap()) { - auto itr = textureMaps.find(model::MaterialKey::SCATTERING_MAP); + auto itr = textureMaps.find(graphics::MaterialKey::SCATTERING_MAP); if (itr != textureMaps.end() && itr->second->isDefined()) { batch.setResourceTexture(ShapePipeline::Slot::MAP::SCATTERING, itr->second->getTextureView()); @@ -226,7 +226,7 @@ void MeshPartPayload::bindMaterial(gpu::Batch& batch, const ShapePipeline::Locat // Emissive / Lightmap if (materialKey.isLightmapMap()) { - auto itr = textureMaps.find(model::MaterialKey::LIGHTMAP_MAP); + auto itr = textureMaps.find(graphics::MaterialKey::LIGHTMAP_MAP); if (itr != textureMaps.end() && itr->second->isDefined()) { batch.setResourceTexture(ShapePipeline::Slot::MAP::EMISSIVE_LIGHTMAP, itr->second->getTextureView()); @@ -234,7 +234,7 @@ void MeshPartPayload::bindMaterial(gpu::Batch& batch, const ShapePipeline::Locat batch.setResourceTexture(ShapePipeline::Slot::MAP::EMISSIVE_LIGHTMAP, textureCache->getGrayTexture()); } } else if (materialKey.isEmissiveMap()) { - auto itr = textureMaps.find(model::MaterialKey::EMISSIVE_MAP); + auto itr = textureMaps.find(graphics::MaterialKey::EMISSIVE_MAP); if (itr != textureMaps.end() && itr->second->isDefined()) { batch.setResourceTexture(ShapePipeline::Slot::MAP::EMISSIVE_LIGHTMAP, itr->second->getTextureView()); @@ -439,7 +439,7 @@ void ModelMeshPartPayload::setShapeKey(bool invalidateShapeKey, bool isWireframe return; } - model::MaterialKey drawMaterialKey; + graphics::MaterialKey drawMaterialKey; if (_drawMaterial) { drawMaterialKey = _drawMaterial->getKey(); } diff --git a/libraries/render-utils/src/MeshPartPayload.h b/libraries/render-utils/src/MeshPartPayload.h index 6e165508f2..8160b9f009 100644 --- a/libraries/render-utils/src/MeshPartPayload.h +++ b/libraries/render-utils/src/MeshPartPayload.h @@ -28,17 +28,17 @@ class Model; class MeshPartPayload { public: MeshPartPayload() {} - MeshPartPayload(const std::shared_ptr& mesh, int partIndex, model::MaterialPointer material); + MeshPartPayload(const std::shared_ptr& mesh, int partIndex, graphics::MaterialPointer material); typedef render::Payload Payload; typedef Payload::DataPointer Pointer; - virtual void updateMeshPart(const std::shared_ptr& drawMesh, int partIndex); + virtual void updateMeshPart(const std::shared_ptr& drawMesh, int partIndex); virtual void notifyLocationChanged() {} void updateTransform(const Transform& transform, const Transform& offsetTransform); - virtual void updateMaterial(model::MaterialPointer drawMaterial); + virtual void updateMaterial(graphics::MaterialPointer drawMaterial); // Render Item interface virtual render::ItemKey getKey() const; @@ -58,13 +58,13 @@ public: int _partIndex = 0; bool _hasColorAttrib { false }; - model::Box _localBound; - model::Box _adjustedLocalBound; - mutable model::Box _worldBound; - std::shared_ptr _drawMesh; + graphics::Box _localBound; + graphics::Box _adjustedLocalBound; + mutable graphics::Box _worldBound; + std::shared_ptr _drawMesh; - std::shared_ptr _drawMaterial; - model::Mesh::Part _drawPart; + std::shared_ptr _drawMaterial; + graphics::Mesh::Part _drawPart; size_t getVerticesCount() const { return _drawMesh ? _drawMesh->getNumVertices() : 0; } size_t getMaterialTextureSize() { return _drawMaterial ? _drawMaterial->getTextureSize() : 0; } diff --git a/libraries/render-utils/src/Model.cpp b/libraries/render-utils/src/Model.cpp index 9c1c579341..d7c038ea7d 100644 --- a/libraries/render-utils/src/Model.cpp +++ b/libraries/render-utils/src/Model.cpp @@ -46,7 +46,7 @@ float Model::FAKE_DIMENSION_PLACEHOLDER = -1.0f; #define HTTP_INVALID_COM "http://invalid.com" const int NUM_COLLISION_HULL_COLORS = 24; -std::vector _collisionMaterials; +std::vector _collisionMaterials; void initCollisionMaterials() { // generates bright colors in red, green, blue, yellow, magenta, and cyan spectrums @@ -72,8 +72,8 @@ void initCollisionMaterials() { // so they don't tend to group together for large models for (int i = 0; i < sectionWidth; ++i) { for (int j = 0; j < numComponents; ++j) { - model::MaterialPointer material; - material = std::make_shared(); + graphics::MaterialPointer material; + material = std::make_shared(); int index = j * sectionWidth + i; float red = component[index]; float green = component[(index + greenPhase) % NUM_COLLISION_HULL_COLORS]; @@ -559,7 +559,7 @@ MeshProxyList Model::getMeshes() const { offset.postTranslate(_offset); glm::mat4 offsetMat = offset.getMatrix(); - for (std::shared_ptr mesh : meshes) { + for (std::shared_ptr mesh : meshes) { if (!mesh) { continue; } @@ -1481,7 +1481,7 @@ void Model::createCollisionRenderItemSet() { // Create the render payloads int numParts = (int)mesh->getNumParts(); for (int partIndex = 0; partIndex < numParts; partIndex++) { - model::MaterialPointer& material = _collisionMaterials[partIndex % NUM_COLLISION_HULL_COLORS]; + graphics::MaterialPointer& material = _collisionMaterials[partIndex % NUM_COLLISION_HULL_COLORS]; auto payload = std::make_shared(mesh, partIndex, material); payload->updateTransform(identity, offset); _collisionRenderItems << payload; @@ -1495,7 +1495,7 @@ bool Model::isRenderable() const { class CollisionRenderGeometry : public Geometry { public: - CollisionRenderGeometry(model::MeshPointer mesh) { + CollisionRenderGeometry(graphics::MeshPointer mesh) { _fbxGeometry = std::make_shared(); std::shared_ptr meshes = std::make_shared(); meshes->push_back(mesh); @@ -1504,7 +1504,7 @@ public: } }; -void Model::setCollisionMesh(model::MeshPointer mesh) { +void Model::setCollisionMesh(graphics::MeshPointer mesh) { if (mesh) { _collisionGeometry = std::make_shared(mesh); } else { diff --git a/libraries/render-utils/src/Model.h b/libraries/render-utils/src/Model.h index 623f869666..6c1f9cb75c 100644 --- a/libraries/render-utils/src/Model.h +++ b/libraries/render-utils/src/Model.h @@ -240,7 +240,7 @@ public: // returns 'true' if needs fullUpdate after geometry change virtual bool updateGeometry(); - void setCollisionMesh(model::MeshPointer mesh); + void setCollisionMesh(graphics::MeshPointer mesh); void setLoadingPriority(float priority) { _loadingPriority = priority; } diff --git a/libraries/render-utils/src/RenderDeferredTask.cpp b/libraries/render-utils/src/RenderDeferredTask.cpp index f860c0494e..8b97f902ac 100644 --- a/libraries/render-utils/src/RenderDeferredTask.cpp +++ b/libraries/render-utils/src/RenderDeferredTask.cpp @@ -338,7 +338,7 @@ void DrawDeferred::run(const RenderContextPointer& renderContext, const Inputs& // Setup haze iff curretn zone has haze auto hazeStage = args->_scene->getStage(); if (hazeStage && hazeStage->_currentFrame._hazes.size() > 0) { - model::HazePointer hazePointer = hazeStage->getHaze(hazeStage->_currentFrame._hazes.front()); + graphics::HazePointer hazePointer = hazeStage->getHaze(hazeStage->_currentFrame._hazes.front()); batch.setUniformBuffer(render::ShapePipeline::Slot::HAZE_MODEL, hazePointer->getHazeParametersBuffer()); } diff --git a/libraries/render-utils/src/RenderPipelines.cpp b/libraries/render-utils/src/RenderPipelines.cpp index 7f644add72..2eb063e9e8 100644 --- a/libraries/render-utils/src/RenderPipelines.cpp +++ b/libraries/render-utils/src/RenderPipelines.cpp @@ -546,7 +546,7 @@ void batchSetter(const ShapePipeline& pipeline, gpu::Batch& batch, RenderArgs* a if (pipeline.locations->materialBufferUnit >= 0) { // Create a default schema static bool isMaterialSet = false; - static model::Material material; + static graphics::Material material; if (!isMaterialSet) { material.setAlbedo(vec3(1.0f)); material.setOpacity(1.0f); diff --git a/libraries/render-utils/src/RenderShadowTask.cpp b/libraries/render-utils/src/RenderShadowTask.cpp index 2e5b7132e4..d83dfd73a5 100644 --- a/libraries/render-utils/src/RenderShadowTask.cpp +++ b/libraries/render-utils/src/RenderShadowTask.cpp @@ -271,7 +271,7 @@ void RenderShadowCascadeSetup::run(const render::RenderContextPointer& renderCon // Set the keylight render args args->pushViewFrustum(*(globalShadow->getCascade(_cascadeIndex).getFrustum())); args->_renderMode = RenderArgs::SHADOW_RENDER_MODE; - if (lightStage->getCurrentKeyLight()->getType() == model::Light::SUN) { + if (lightStage->getCurrentKeyLight()->getType() == graphics::Light::SUN) { const float shadowSizeScale = 1e16f; // Set the size scale to a ridiculously high value to prevent small object culling which assumes // the view frustum is a perspective projection. But this isn't the case for the sun which diff --git a/libraries/render-utils/src/StencilMaskPass.cpp b/libraries/render-utils/src/StencilMaskPass.cpp index ab1ac7c1aa..de8de9abcf 100644 --- a/libraries/render-utils/src/StencilMaskPass.cpp +++ b/libraries/render-utils/src/StencilMaskPass.cpp @@ -26,7 +26,7 @@ void PrepareStencil::configure(const Config& config) { _forceDraw = config.forceDraw; } -model::MeshPointer PrepareStencil::getMesh() { +graphics::MeshPointer PrepareStencil::getMesh() { if (!_mesh) { std::vector vertices { @@ -36,7 +36,7 @@ model::MeshPointer PrepareStencil::getMesh() { { 1.0f, -1.0f, 0.0f }, { 0.0f, -1.0f, 0.0f } }; std::vector indices { 0, 7, 1, 1, 3, 2, 3, 5, 4, 5, 7, 6 }; - _mesh = model::Mesh::createIndexedTriangles_P3F((uint32_t) vertices.size(), (uint32_t) indices.size(), vertices.data(), indices.data()); + _mesh = graphics::Mesh::createIndexedTriangles_P3F((uint32_t) vertices.size(), (uint32_t) indices.size(), vertices.data(), indices.data()); } return _mesh; } @@ -95,7 +95,7 @@ void PrepareStencil::run(const RenderContextPointer& renderContext, const gpu::F batch.setInputStream(0, mesh->getVertexStream()); // Draw - auto part = mesh->getPartBuffer().get(0); + auto part = mesh->getPartBuffer().get(0); batch.drawIndexed(gpu::TRIANGLES, part._numIndices, part._startIndex); } else { batch.setPipeline(getPaintStencilPipeline()); diff --git a/libraries/render-utils/src/StencilMaskPass.h b/libraries/render-utils/src/StencilMaskPass.h index ef1371d04e..a8e4d1e1f2 100644 --- a/libraries/render-utils/src/StencilMaskPass.h +++ b/libraries/render-utils/src/StencilMaskPass.h @@ -63,8 +63,8 @@ private: gpu::PipelinePointer _paintStencilPipeline; gpu::PipelinePointer getPaintStencilPipeline(); - model::MeshPointer _mesh; - model::MeshPointer getMesh(); + graphics::MeshPointer _mesh; + graphics::MeshPointer getMesh(); int _maskMode { 0 }; bool _forceDraw { false }; diff --git a/libraries/render-utils/src/ZoneRenderer.cpp b/libraries/render-utils/src/ZoneRenderer.cpp index c0d01c2eaf..c39e6068b7 100644 --- a/libraries/render-utils/src/ZoneRenderer.cpp +++ b/libraries/render-utils/src/ZoneRenderer.cpp @@ -145,14 +145,14 @@ void DebugZoneLighting::run(const render::RenderContextPointer& context, const I auto deferredTransform = inputs; auto lightStage = context->_scene->getStage(LightStage::getName()); - std::vector keyLightStack; + std::vector keyLightStack; if (lightStage && lightStage->_currentFrame._sunLights.size()) { for (auto index : lightStage->_currentFrame._sunLights) { keyLightStack.push_back(lightStage->getLight(index)); } } - std::vector ambientLightStack; + std::vector ambientLightStack; if (lightStage && lightStage->_currentFrame._ambientLights.size()) { for (auto index : lightStage->_currentFrame._ambientLights) { ambientLightStack.push_back(lightStage->getLight(index)); @@ -160,7 +160,7 @@ void DebugZoneLighting::run(const render::RenderContextPointer& context, const I } auto backgroundStage = context->_scene->getStage(BackgroundStage::getName()); - std::vector skyboxStack; + std::vector skyboxStack; if (backgroundStage && backgroundStage->_currentFrame._backgrounds.size()) { for (auto index : backgroundStage->_currentFrame._backgrounds) { auto background = backgroundStage->getBackground(index); diff --git a/libraries/script-engine/src/ModelScriptingInterface.cpp b/libraries/script-engine/src/ModelScriptingInterface.cpp index e58afeaba8..c693083ebf 100644 --- a/libraries/script-engine/src/ModelScriptingInterface.cpp +++ b/libraries/script-engine/src/ModelScriptingInterface.cpp @@ -102,7 +102,7 @@ QScriptValue ModelScriptingInterface::appendMeshes(MeshProxyList in) { indexStartOffset += numVertices; } - model::MeshPointer result(new model::Mesh()); + graphics::MeshPointer result(new graphics::Mesh()); gpu::Element vertexElement = gpu::Element(gpu::VEC3, gpu::FLOAT, gpu::XYZ); gpu::Buffer* combinedVertexBuffer = new gpu::Buffer(combinedVertexSize, combinedVertexData.get()); @@ -130,12 +130,12 @@ QScriptValue ModelScriptingInterface::appendMeshes(MeshProxyList in) { gpu::BufferView combinedIndexesBufferView(combinedIndexesBufferPointer, indexElement); result->setIndexBuffer(combinedIndexesBufferView); - std::vector parts; - parts.emplace_back(model::Mesh::Part((model::Index)0, // startIndex - (model::Index)result->getNumIndices(), // numIndices - (model::Index)0, // baseVertex - model::Mesh::TRIANGLES)); // topology - result->setPartBuffer(gpu::BufferView(new gpu::Buffer(parts.size() * sizeof(model::Mesh::Part), + std::vector parts; + parts.emplace_back(graphics::Mesh::Part((graphics::Index)0, // startIndex + (graphics::Index)result->getNumIndices(), // numIndices + (graphics::Index)0, // baseVertex + graphics::Mesh::TRIANGLES)); // topology + result->setPartBuffer(gpu::BufferView(new gpu::Buffer(parts.size() * sizeof(graphics::Mesh::Part), (gpu::Byte*) parts.data()), gpu::Element::PART_DRAWCALL)); @@ -153,7 +153,7 @@ QScriptValue ModelScriptingInterface::transformMesh(glm::mat4 transform, MeshPro } const auto inverseTransposeTransform = glm::inverse(glm::transpose(transform)); - model::MeshPointer result = mesh->map([&](glm::vec3 position){ return glm::vec3(transform * glm::vec4(position, 1.0f)); }, + graphics::MeshPointer result = mesh->map([&](glm::vec3 position){ return glm::vec3(transform * glm::vec4(position, 1.0f)); }, [&](glm::vec3 color){ return color; }, [&](glm::vec3 normal){ return glm::vec3(inverseTransposeTransform * glm::vec4(normal, 0.0f)); }, [&](uint32_t index){ return index; }); @@ -199,7 +199,7 @@ QScriptValue ModelScriptingInterface::getVertex(MeshProxy* meshProxy, int vertex QScriptValue ModelScriptingInterface::newMesh(const QVector& vertices, const QVector& normals, const QVector& faces) { - model::MeshPointer mesh(new model::Mesh()); + graphics::MeshPointer mesh(new graphics::Mesh()); // vertices auto vertexBuffer = std::make_shared(vertices.size() * sizeof(glm::vec3), (gpu::Byte*)vertices.data()); @@ -236,12 +236,12 @@ QScriptValue ModelScriptingInterface::newMesh(const QVector& vertices mesh->setIndexBuffer(indexBufferView); // parts - std::vector parts; - parts.emplace_back(model::Mesh::Part((model::Index)0, // startIndex - (model::Index)faces.size() * 3, // numIndices - (model::Index)0, // baseVertex - model::Mesh::TRIANGLES)); // topology - mesh->setPartBuffer(gpu::BufferView(new gpu::Buffer(parts.size() * sizeof(model::Mesh::Part), + std::vector parts; + parts.emplace_back(graphics::Mesh::Part((graphics::Index)0, // startIndex + (graphics::Index)faces.size() * 3, // numIndices + (graphics::Index)0, // baseVertex + graphics::Mesh::TRIANGLES)); // topology + mesh->setPartBuffer(gpu::BufferView(new gpu::Buffer(parts.size() * sizeof(graphics::Mesh::Part), (gpu::Byte*) parts.data()), gpu::Element::PART_DRAWCALL)); diff --git a/libraries/script-engine/src/SceneScriptingInterface.cpp b/libraries/script-engine/src/SceneScriptingInterface.cpp index 3883b948df..7b36b815fb 100644 --- a/libraries/script-engine/src/SceneScriptingInterface.cpp +++ b/libraries/script-engine/src/SceneScriptingInterface.cpp @@ -112,17 +112,17 @@ bool SceneScripting::Stage::isSunModelEnabled() const { void SceneScripting::Stage::setBackgroundMode(const QString& mode) { if (mode == QString("inherit")) { - _skyStage->setBackgroundMode(model::SunSkyStage::NO_BACKGROUND); + _skyStage->setBackgroundMode(graphics::SunSkyStage::NO_BACKGROUND); } else if (mode == QString("skybox")) { - _skyStage->setBackgroundMode(model::SunSkyStage::SKY_BOX); + _skyStage->setBackgroundMode(graphics::SunSkyStage::SKY_BOX); } } QString SceneScripting::Stage::getBackgroundMode() const { switch (_skyStage->getBackgroundMode()) { - case model::SunSkyStage::NO_BACKGROUND: + case graphics::SunSkyStage::NO_BACKGROUND: return QString("inherit"); - case model::SunSkyStage::SKY_BOX: + case graphics::SunSkyStage::SKY_BOX: return QString("skybox"); default: return QString("inherit"); @@ -131,7 +131,7 @@ QString SceneScripting::Stage::getBackgroundMode() const { SceneScriptingInterface::SceneScriptingInterface() : _stage{ new SceneScripting::Stage{ _skyStage } } { // Let's make sure the sunSkyStage is using a proceduralSkybox - _skyStage->setSkybox(model::SkyboxPointer(new ProceduralSkybox())); + _skyStage->setSkybox(graphics::SkyboxPointer(new ProceduralSkybox())); } void SceneScriptingInterface::setShouldRenderAvatars(bool shouldRenderAvatars) { @@ -148,6 +148,6 @@ void SceneScriptingInterface::setShouldRenderEntities(bool shouldRenderEntities) } } -model::SunSkyStagePointer SceneScriptingInterface::getSkyStage() const { +graphics::SunSkyStagePointer SceneScriptingInterface::getSkyStage() const { return _skyStage; } diff --git a/libraries/script-engine/src/SceneScriptingInterface.h b/libraries/script-engine/src/SceneScriptingInterface.h index 160c37284c..07b8c22ca6 100644 --- a/libraries/script-engine/src/SceneScriptingInterface.h +++ b/libraries/script-engine/src/SceneScriptingInterface.h @@ -23,7 +23,7 @@ namespace SceneScripting { Q_OBJECT public: - Location(model::SunSkyStagePointer skyStage) : _skyStage{ skyStage } {} + Location(graphics::SunSkyStagePointer skyStage) : _skyStage{ skyStage } {} Q_PROPERTY(float longitude READ getLongitude WRITE setLongitude) Q_PROPERTY(float latitude READ getLatitude WRITE setLatitude) @@ -37,7 +37,7 @@ namespace SceneScripting { void setAltitude(float altitude); protected: - model::SunSkyStagePointer _skyStage; + graphics::SunSkyStagePointer _skyStage; }; using LocationPointer = std::unique_ptr; @@ -45,7 +45,7 @@ namespace SceneScripting { Q_OBJECT public: - Time(model::SunSkyStagePointer skyStage) : _skyStage{ skyStage } {} + Time(graphics::SunSkyStagePointer skyStage) : _skyStage{ skyStage } {} Q_PROPERTY(float hour READ getHour WRITE setHour) Q_PROPERTY(int day READ getDay WRITE setDay) @@ -56,7 +56,7 @@ namespace SceneScripting { void setDay(int day); protected: - model::SunSkyStagePointer _skyStage; + graphics::SunSkyStagePointer _skyStage; }; using TimePointer = std::unique_ptr