OpenGL ES; rendering texture created from CGBitmapContext

前端 未结 1 874
感动是毒
感动是毒 2021-01-07 01:04

I am executing the following, which I have derived from a few different tutorials (Just a single render pass, initialisation code not shown but works fine for untextured pri

相关标签:
1条回答
  • 2021-01-07 01:37

    The problem is that width and height are not powers of two. There are two solutions:

    • Use the texture rectangle extension. Set the texture target to GL_TEXTURE_RECTANGLE_ARB instead of GL_TEXTURE_2D. You will have to enable this extension before using it. Note that rectangle textures do not support mipmaps.
    • Use powers of two for texture dimensions.
    0 讨论(0)
提交回复
热议问题