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

前端 未结 8 2712
清酒与你
清酒与你 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

    I was also getting

    The operation couldn’t be completed. (GLKTextureLoaderErrorDomain error 8.)
    

    when loading a texture late in runtime while several previous textures had loaded successfully closer to launch. I was able to solve the problem by inserting the following line of code before the GLKTextureLoader call:

    NSLog(@"GL Error = %u", glGetError());
    

    Sure enough, GL was reporting an error, but it did not require me to address the error in order for GLKTextureLoader to work. Merely getting the GL Error was enough.

提交回复
热议问题