diff --git a/src/ui/simple/CSimpleTexture.cpp b/src/ui/simple/CSimpleTexture.cpp index c7db1d2..873929d 100644 --- a/src/ui/simple/CSimpleTexture.cpp +++ b/src/ui/simple/CSimpleTexture.cpp @@ -479,6 +479,15 @@ void CSimpleTexture::SetPosition(const CRect& rect, C3Vector* position) { position[3] = { rect.maxX, rect.minY, this->m_layoutDepth }; } +void CSimpleTexture::SetShader(CGxShader* shader) { + if (this->m_shader == shader) { + return; + } + + this->m_shader = shader; + this->OnRegionChanged(); +} + void CSimpleTexture::SetTexCoord(const CRect& texRect) { this->m_texCoord[0] = { texRect.minX, texRect.minY }; this->m_texCoord[1] = { texRect.minX, texRect.maxY }; diff --git a/src/ui/simple/CSimpleTexture.hpp b/src/ui/simple/CSimpleTexture.hpp index 4d998e0..e3433b1 100644 --- a/src/ui/simple/CSimpleTexture.hpp +++ b/src/ui/simple/CSimpleTexture.hpp @@ -55,6 +55,7 @@ class CSimpleTexture : public CSimpleRegion { void SetAlpha(float alpha); void SetBlendMode(EGxBlend blend); void SetPosition(const CRect& rect, C3Vector* position); + void SetShader(CGxShader* shader); void SetTexCoord(const CRect& texRect); void SetTexCoord(const C2Vector* texCoord); int32_t SetTexture(const char* fileName, bool wrapU, bool wrapV, EGxTexFilter filter, TextureImageMode mode);