feat(gx): handle changes to texture wrap settings

This commit is contained in:
fallenoak 2023-03-04 12:20:15 -06:00
parent 2282b8a54a
commit 45c1978a85
No known key found for this signature in database
GPG key ID: 7628F8E61AEA070D
3 changed files with 16 additions and 5 deletions

View file

@ -516,8 +516,9 @@ void CM2SceneRender::SetupTextures() {
if (texture) {
uint16_t textureFlags = this->m_data->textures[textureIndex].flags;
EGxTexWrapMode wrapU = static_cast<EGxTexWrapMode>(textureFlags & 0x1);
EGxTexWrapMode wrapV = static_cast<EGxTexWrapMode>(textureFlags & 0x2);
EGxTexWrapMode wrapU = textureFlags & 0x1 ? GxTex_Wrap : GxTex_Clamp;
EGxTexWrapMode wrapV = textureFlags & 0x2 ? GxTex_Wrap : GxTex_Clamp;
GxTexSetWrap(texture, wrapU, wrapV);
}