* @param[in] createInfo Valid createInfo structure
* @param[in] controller Reference to the controller
*/
- Shader(const Graphics::ShaderCreateInfo& createInfo, Graphics::EglGraphicsController& controller)
- : ShaderResource(createInfo, controller)
- {
- }
+ Shader(const Graphics::ShaderCreateInfo& createInfo, Graphics::EglGraphicsController& controller);
/**
* @brief Destructor
*/
- ~Shader() override = default;
+ ~Shader() override;
/**
* @brief Called when GL resources are destroyed
*/
- void DestroyResource() override
- {
- // TODO: Implement destroying the resource
- }
+ void DestroyResource() override;
/**
* @brief Called when initializing the resource
*/
bool InitializeResource() override
{
- // TODO: Implement initializing resource
- return {};
+ // The Shader has instant initialization, hence no need to initialize GL resource
+ // here
+ return true;
}
/**
+ * @brief Compiles shader
+ *
+ * @return True on success
+ */
+ [[nodiscard]] bool Compile() const;
+
+ /**
* @brief Called when UniquePtr<> on client-side dies
*/
- void DiscardResource() override
- {
- // TODO: Implement moving to the discard queue
- }
+ void DiscardResource() override;
+
+ uint32_t GetGLShader() const;
+
+private:
+ struct Impl;
+ std::unique_ptr<Impl> mImpl{nullptr};
};
} // namespace Dali::Graphics::GLES