Skip to content

Commit

Permalink
Correct force texture clamp condition in OGLRender::drawTexturedRect.
Browse files Browse the repository at this point in the history
Fixed issue #506 - Perfect Dark Target Test target not displaying correctly
  • Loading branch information
gonetz committed Jul 3, 2015
1 parent 40da41d commit c50b3c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/OpenGL.cpp
Expand Up @@ -1063,10 +1063,10 @@ void OGLRender::drawTexturedRect(const TexturedRectParams & _params)

glActiveTexture(GL_TEXTURE0 + t);

if ((cache.current[t]->mirrorS == 0) && ((texST[t].s0 < texST[t].s1 && texST[t].s0 >= 0.0 && texST[t].s1 <= cache.current[t]->width) || (cache.current[t]->maskS == 0 && (texST[t].s0 < -1024.0f || texST[t].s1 > 1023.99f))))
if ((cache.current[t]->mirrorS == 0 && cache.current[t]->maskS == 0 && texST[t].s0 < texST[t].s1 && texST[t].s0 >= 0.0 && texST[t].s1 <= (float)cache.current[t]->width) || (cache.current[t]->maskS == 0 && (texST[t].s0 < -1024.0f || texST[t].s1 > 1023.99f)))
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);

if (cache.current[t]->mirrorT == 0 && texST[t].t0 < texST[t].t1 && texST[t].t0 >= 0.0f && texST[t].t1 <= cache.current[t]->height)
if (cache.current[t]->mirrorT == 0 && cache.current[t]->maskT == 0 && texST[t].t0 < texST[t].t1 && texST[t].t0 >= 0.0f && texST[t].t1 <= (float)cache.current[t]->height)
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);

texST[t].s0 *= cache.current[t]->scaleS;
Expand Down

0 comments on commit c50b3c8

Please sign in to comment.