GLKTextureLoader fails when loading a certain texture the first time, but succeeds the second time

前端 未结 8 2709
清酒与你
清酒与你 2021-02-20 12:57

I\'m making an iPhone application with OpenGL ES 2.0 using the GLKit. I\'m using GLKTextureLoader to load textures synchronously.

The problem is that for a certain textu

8条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-20 13:42

    Ok, I'll try this one again as I ran into the error again. What appears to happen is that if there is some other glError that has not been processed, then you will have trouble with the texture loading on the first time.

    Before you load that texture that fails, check for a glError and then track down where that error occurred. Or you can capture an opengl frame prior to where the texture is loaded and see if a glError is being thrown prior. This happened to me both times when I ran into the error 8, and both times this error disappeared once I fixed the error that had occurred earlier.

提交回复
热议问题