X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali-scene3d%2Fpublic-api%2Floader%2Fshader-definition.h;h=743d34347b8cdd22b12070372858413ccfb26340;hb=HEAD;hp=0fe83d34c162649bc045509090fc25f0c9ad2af9;hpb=c9ec8565c4fa8482897915f8ac0cce8179ec4dc0;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git diff --git a/dali-scene3d/public-api/loader/shader-definition.h b/dali-scene3d/public-api/loader/shader-definition.h index 0fe83d3..743d343 100644 --- a/dali-scene3d/public-api/loader/shader-definition.h +++ b/dali-scene3d/public-api/loader/shader-definition.h @@ -24,13 +24,15 @@ // INTERNAL INCLUDES #include +#include namespace Dali::Scene3D::Loader { -/* +/** * @brief Defines a shader with paths to the files which define its * vertex and fragment components, and a mapping of uniform names (which are * used to refer to them in GLSL) to data. + * @SINCE_2_0.7 */ struct DALI_SCENE3D_API ShaderDefinition { @@ -44,30 +46,27 @@ struct DALI_SCENE3D_API ShaderDefinition 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); - ShaderDefinition& operator=(const ShaderDefinition& other); + ShaderDefinition& operator=(const ShaderDefinition& other) = delete; - ShaderDefinition(ShaderDefinition&&) = default; + ShaderDefinition(ShaderDefinition&&) = default; ShaderDefinition& operator=(ShaderDefinition&&) = default; - /* + /** * @brief Attempts to load the source of the vertex and fragment shaders, * then performs pre-processing of defines. + * @SINCE_2_0.7 * @note This may be called from any thread. */ RawData LoadRaw(const std::string& shadersPath) const; - /* + /** * @brief Creates a DALi Shader from the sources in @a raw, traverses * uniforms to get them to register their data against their name, * then returns the Shader. + * @SINCE_2_0.7 * @note This must be called from the event thread. */ Shader Load(RawData&& raw) const; @@ -76,12 +75,13 @@ public: // DATA std::shared_ptr mRawData; RendererState::Type mRendererState = RendererState::NONE; - std::string mVertexShaderPath; - std::string mFragmentShaderPath; - std::vector mDefines; - std::vector mHints; - Property::Map mUniforms; - bool mUseBuiltInShader{false}; + std::string mVertexShaderPath; + std::string mFragmentShaderPath; + std::vector mDefines; + std::vector mMacros; + std::vector mHints; + Property::Map mUniforms; + bool mUseBuiltInShader{false}; }; } // namespace Dali::Scene3D::Loader