Revert "[Tizen] Add log if destroyed visual get some signal"
[platform/core/uifw/dali-toolkit.git] / dali-scene3d / public-api / loader / shader-definition.h
index d381c57..f39ac5f 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef DALI_SCENE3D_LOADER_SHADER_DEFINITION_H
 #define DALI_SCENE3D_LOADER_SHADER_DEFINITION_H
 /*
- * Copyright (c) 2022 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  *
  */
 
-// INTERNAL INCLUDES
-#include "dali-scene3d/public-api/loader/renderer-state.h"
-
 // EXTERNAL INCLUDES
+#include <dali/public-api/common/vector-wrapper.h>
+#include <dali/public-api/rendering/shader.h>
 #include <memory>
-#include "dali/public-api/common/vector-wrapper.h"
-#include "dali/public-api/rendering/shader.h"
 
-namespace Dali
-{
-namespace Scene3D
-{
-namespace Loader
+// INTERNAL INCLUDES
+#include <dali-scene3d/public-api/loader/renderer-state.h>
+#include <dali-scene3d/public-api/loader/shader-option.h>
+
+namespace Dali::Scene3D::Loader
 {
 /*
  * @brief Defines a shader with paths to the files which define its
@@ -44,13 +41,10 @@ struct DALI_SCENE3D_API ShaderDefinition
   {
     std::string mVertexShaderSource;
     std::string mFragmentShaderSource;
+    std::string mShadowVertexShaderSource;
+    std::string mShadowFragmentShaderSource;
   };
 
-  /*
-   * @brief Apply the defines values to shader.
-   */
-  static void ApplyDefine(std::string& shaderCode, const std::string& definevar);
-
   ShaderDefinition() = default;
 
   ShaderDefinition(const ShaderDefinition& other);
@@ -75,18 +69,18 @@ struct DALI_SCENE3D_API ShaderDefinition
   Shader Load(RawData&& raw) const;
 
 public: // DATA
-  RendererState::Type mRendererState = RendererState::NONE;
+  std::shared_ptr<RawData> mRawData;
+  RendererState::Type      mRendererState = RendererState::NONE;
 
-  std::string              mVertexShaderPath;
-  std::string              mFragmentShaderPath;
-  std::vector<std::string> mDefines;
-  std::vector<std::string> mHints;
-  Property::Map            mUniforms;
-  bool                     mUseBuiltInShader{false};
+  std::string                                mVertexShaderPath;
+  std::string                                mFragmentShaderPath;
+  std::vector<std::string>                   mDefines;
+  std::vector<ShaderOption::MacroDefinition> mMacros;
+  std::vector<std::string>                   mHints;
+  Property::Map                              mUniforms;
+  bool                                       mUseBuiltInShader{false};
 };
 
-} // namespace Loader
-} // namespace Scene3D
-} // namespace Dali
+} // namespace Dali::Scene3D::Loader
 
-#endif //DALI_SCENE3D_LOADER_SHADER_DEFINITION_H
+#endif // DALI_SCENE3D_LOADER_SHADER_DEFINITION_H