且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用OpenGL在Mac OSX El Capitan上渲染毛刺

更新时间:2023-01-20 09:23:16

感谢Sidney Markowitz在此线程的帮助=>

Thanks to the help of Sidney Markowitz from this thread => https://lists.gnu.org/archive/html/enigma-devel/2015-10/msg00001.html , I figured a solution : replacing SDL_Image 1.2.12 version by 1.2.10 version.

如果我做对了,发现1.2.10带有旧的通用代码,这在AppStore中是不允许的,因此使用此版本提交App可能会被拒绝.因此,我将尝试仅使用x86代码重新编译它,这应该可以解决问题.

If I got this right, the catch is that 1.2.10 comes with old universal code which is not allowed on the AppStore, so submitting an App with this version would likely end in a rejection. So I'm going to try to recompile it with only x86 code, that should likely do the trick.

我没有使用重新编译,而是使用了Lipo( http://www.manpages.info /macosx/lipo.1.html ),就像这样:

Instead of recompiling, I just used Lipo ( http://www.manpages.info/macosx/lipo.1.html ), like this :

lipo-删除ppc-输出〜/Documents/SDL_image/Library/Frameworks/SDL_image.framework/Versions/A/SDL_image

lipo -remove ppc -output ~/Documents/SDL_image /Library/Frameworks/SDL_image.framework/Versions/A/SDL_image

然后将〜/Documents/SDL_image"移回至"/Library/Frameworks/SDL_image.framework/Versions/A/".最后,我编辑了它的info.plist,以修复Bundle ID(需要2个点),以便可以在AppStore上发布.

And then moved back "~/Documents/SDL_image" to "/Library/Frameworks/SDL_image.framework/Versions/A/" . And finally I edited its info.plist to fix the Bundle ID (needs 2 dots in it) so publishing on the AppStore could work.

再次感谢Sidney Markowitz提供的Lipo提示! :-)

Thanks again to Sidney Markowitz for the Lipo hint ! :-)

新版本已被Apple拒绝,因为SDL_image 1.2.10使用了不推荐使用的CGDataProviderCreate API.该代码包含"#ifdef"以使用较新的替代品,因此我将不得不重新编译而不是使用Lipo,但恐怕此较新的替代品是OSX El Capitan上实际出现故障的原因.

New version has been rejected by Apple, because SDL_image 1.2.10 uses a deprecated CGDataProviderCreate API. The code contains a "#ifdef" to use a newer replacement, so I'll have to recompile it instead of using Lipo, but I'm afraid this newer replacement is the actual source of the glitch on OSX El Capitan.

重新编译SDL_image 1.2.10可以工作,但不是那样,我不得不将安装文件夹更改为@rpath和其他一些参数,然后在AppStore上成功接受了该文件.

Recompiling SDL_image 1.2.10 works, but not as it, I had to change the installation folder to @rpath and a few other parameters and then it was successfully accepted on the AppStore.