From 6d76832c1d9149860fe5185bd5c373fb5322c12d Mon Sep 17 00:00:00 2001 From: Atdunbg <979541498@qq.com> Date: Wed, 9 Jul 2025 17:53:27 +0800 Subject: [PATCH] add GetPath() and change operator== --- Hazel/src/Platform/OpenGL/OpenGLTexture.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Hazel/src/Platform/OpenGL/OpenGLTexture.h b/Hazel/src/Platform/OpenGL/OpenGLTexture.h index cda7e21..c82d5a0 100644 --- a/Hazel/src/Platform/OpenGL/OpenGLTexture.h +++ b/Hazel/src/Platform/OpenGL/OpenGLTexture.h @@ -18,6 +18,7 @@ namespace Hazel virtual const uint32_t GetWidth() const override {return m_Width; } virtual const uint32_t GetHeight() const override { return m_Height; } + virtual const std::string& GetPath() const override {return m_Path; } virtual void Bind(uint32_t slot = 0) const override; @@ -27,7 +28,7 @@ namespace Hazel virtual bool operator==(const Texture& other) const override { - return m_RendererID == ((OpenGLTexture2D&)other).m_RendererID; + return m_RendererID == other.GetRendererID(); } private: std::string m_Path;