mirror of
https://github.com/whoahq/whoa.git
synced 2026-02-01 00:02:45 +03:00
feat(ui): add CSimpleTexture::SetShader
This commit is contained in:
parent
26093afe36
commit
6b2ccd6735
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user