mirror of
https://github.com/whoahq/whoa.git
synced 2026-11-06 06:39:53 +03:00
feat(ui): add CSimpleTexture::SetShader
This commit is contained in:
2 files changed
+10
No files matched your search
@@ -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 };
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user