在OS X埃尔卡皮坦SDL_image视觉干扰 [英] SDL_image visual glitch on OS X El Capitan

查看:184
本文介绍了在OS X埃尔卡皮坦SDL_image视觉干扰的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当试图加载和C或pygame的Python中(都使用SDL)用快板5显示位图,相反,它呈现一个小故障(见下图)。

When trying to load and display bitmaps using Allegro 5 in C or PyGame in Python (both use SDL), instead, it renders a glitch (see screenshot below).

我试着谷歌上搜索了一下,发现它可以给SDL_image与OS X埃尔卡皮坦不兼容有关,但没有解决方案。有人吗?

I tried googling it and found that it could be related to SDL_image incompatibilities with OS X El Capitan, but no solutions. Anyone?

目前,我尝试:


  • 安装SDL_image 1.2.10(最新兼容的版本)。 都能跟得上!

  • 通过自定义公式安装SDL_image 1.2.10与自制。 也没什么!

在截图中,这些随机像素应该是三红砖位图。顺便说一句,我使用这些功能来加载和绘制位图,分别为:

On the screenshot, those random pixels should be three red brick bitmaps. By the way, I'm using those functions to load and draw the bitmap, respectively:

tileset[0] = al_load_bitmap("./data/gfx/bricks.png");
al_draw_bitmap(tileset[0], pos_x, pos_y, 0);

屏幕

推荐答案

该错误实际上是在埃尔卡皮坦SDL_image。这里是降级SDL_image到1.2.10一种解决方法(的的SDL)。这是可能的,你可能已经安装了SDL 1.2.10,但仍然有SDL_image 1.2.12。尝试取出并强制安装正确的版本。

The bug is actually with SDL_image under El Capitan. There is a workaround by downgrading SDL_image to 1.2.10 (not SDL). It's possible you may have installed SDL 1.2.10 but still have SDL_image 1.2.12. Try removing and force installing the correct version.

在这里看到的细节:

https://bitbucket.org/pygame/pygame/issues/284/max-osx-el-capitan-using-the-de$p$pcated

我试过这个修复自己和pygame的现10.11下正常工作。

I've tried this fix myself and Pygame is working fine under 10.11 now.

这篇关于在OS X埃尔卡皮坦SDL_image视觉干扰的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆