It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center。
7年前关闭。
我想将图像绘制为纹理。我的问题是图像大小不是2的幂。
如何绘制此图像。
请给我建议。
7年前关闭。
我想将图像绘制为纹理。我的问题是图像大小不是2的幂。
如何绘制此图像。
请给我建议。
最佳答案
您可以将非2次幂的图像嵌入2次幂的图像文件中,并在顶点上使用纹理坐标来指定将图像的哪一部分用作您的纹理。阅读此tutorial on textures了解更多信息。
您可以用更多的“子图像”(如果合适)填充图像文件中的剩余空间,以用作进一步的纹理以避免浪费空间。
关于objective-c - 在Opengl中实现非2幂幂纹理,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/12401410/