File tree Expand file tree Collapse file tree 4 files changed +16
-0
lines changed
Expand file tree Collapse file tree 4 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,12 @@ class FactoryPtr
7171 [[nodiscard]]
7272 bool operator !() const { return m_pObject == nullptr ; }
7373
74+ [[nodiscard]]
75+ bool operator ==(const FactoryPtr& other) const
76+ {
77+ return *m_pObject == *other.m_pObject ;
78+ }
79+
7480private:
7581 void CreateObject ();
7682 void DestroyObject ();
Original file line number Diff line number Diff line change @@ -11,6 +11,9 @@ class IUIShader
1111 virtual bool inited () = 0;
1212 virtual void destroy () = 0;
1313
14+ [[nodiscard]]
15+ virtual bool operator ==(const IUIShader& other) const = 0 ;
16+
1417 virtual bool GetBaseTextureResolution (Fvector2& res) = 0;
1518 virtual xrImTextureData GetImGuiTextureId () = 0;
1619};
Original file line number Diff line number Diff line change @@ -7,6 +7,11 @@ void dxUIShader::Copy(IUIShader& _in) { *this = *((dxUIShader*)&_in); }
77void dxUIShader::create (LPCSTR sh, LPCSTR tex) { hShader.create (sh, tex); }
88void dxUIShader::destroy () { hShader.destroy (); }
99
10+ bool dxUIShader::operator ==(const IUIShader& other) const
11+ {
12+ return hShader == static_cast <const dxUIShader&>(other).hShader ;
13+ }
14+
1015CTexture* dxUIShader::GetBaseTexture () const
1116{
1217 if (!hShader)
Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ class dxUIShader : public IUIShader
1717 virtual bool inited () { return hShader; }
1818 virtual void destroy ();
1919
20+ bool operator ==(const IUIShader& other) const override ;
21+
2022 CTexture* GetBaseTexture () const ;
2123 bool GetBaseTextureResolution (Fvector2& res) override ;
2224 xrImTextureData GetImGuiTextureId () override ;
You can’t perform that action at this time.
0 commit comments