I'm seeing artifacts when I attempt to rotate an image

前端 未结 2 948
粉色の甜心
粉色の甜心 2021-01-25 14:27

This is the before: http://img22.imageshack.us/img22/5310/beforedes.jpg znd after: http://img189.imageshack.us/img189/8890/afterr.jpg

EDIT:: Now that I look at imageshac

相关标签:
2条回答
  • 2021-01-25 15:13

    Looks like the texture is set to GL_WRAP. Try GL_CLAMP_TO_EDGE instead.

    0 讨论(0)
  • 2021-01-25 15:14

    In Game::loadImage, after your glBindTexture call:

    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);        
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);        
    

    Your current setting is GL_REPEAT, which is the OpenGL default.

    0 讨论(0)
提交回复
热议问题