开发者

QPixmap image loading problem

开发者 https://www.devze.com 2023-03-26 13:59 出处:网络
Basically I am trying to load the image as a texture using QPixmap: texture[T_WALL] = bindTexture(QPixmap(\":/images/wall.png\"), GL_TEXTURE_2D);

Basically I am trying to load the image as a texture using QPixmap:

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

Th开发者_如何学Pythone code works on my development machine, but not in the vm / other pcs without QT. Initially I was using jpegs and just assumed that I messed up the plugins, but as I understand, no plugins are needed for png files so I have no idea where the problem is.

Results are the same when loading local files and using Qt resources.

I am deploying libgcc_s_dw2-1.ddl, mingwm10.dll, QtCore4.dll, QtGui4.dll, QtOpenGL4.dll. Do I need anything else?


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).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号