2

基本上我正在尝试使用 QPixmap 将图像加载为纹理:

texture[T_WALL] = bindTexture(QPixmap(":/images/wall.png"), GL_TEXTURE_2D);

该代码适用于我的开发机器,但不适用于没有 QT 的 vm/其他电脑。最初我使用 jpegs,只是假设我搞砸了插件,但据我所知,png 文件不需要插件,所以我不知道问题出在哪里。

加载本地文件和使用 Qt 资源时的结果是相同的。

我正在部署 libgcc_s_dw2-1.ddl、mingwm10.dll、QtCore4.dll、QtGui4.dll、QtOpenGL4.dll。我还需要什么吗?

4

1 回答 1

2

Try adding an imageformats directory to your application directory and put qmng4.dll there. See my answer to the question Qt dll deployment on windows If it still does not work, get the Sysinternals suite which contains dgbview.exe that allows you to watch qDebug messages (even for release builds).

于 2011-08-06T16:25:37.133 回答