add GetPath() and change operator==

This commit is contained in:
2025-07-09 17:53:27 +08:00
parent aff8d1531c
commit 6d76832c1d

View File

@ -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;