Alright so after building a 64bit flavor of SOIL, I linked to the library in my .pro file (in Qt Creator) and established the include directory. I have hit a problem. This is with my image resources:
I have a png in an image resource and used the resource editor "Copy Resource Path to Clipboard" feature to grab the path. I then dropped the path into a SOIL_load_OGL_texture function call within a GLWidget constructor. Heres the code:
MyGLWidget
::MyGLWidget(QWidget *parent
) :{
tex = SOIL_load_OGL_texture(":/gfx/gfx/back.png", SOIL_LOAD_AUTO, SOIL_CREATE_NEW_ID, SOIL_FLAG_INVERT_Y);
qDebug() << tex;
}
MyGLWidget::MyGLWidget(QWidget *parent) :
QGLWidget(parent)
{
tex = SOIL_load_OGL_texture(":/gfx/gfx/back.png", SOIL_LOAD_AUTO, SOIL_CREATE_NEW_ID, SOIL_FLAG_INVERT_Y);
qDebug() << tex;
}
To copy to clipboard, switch view to plain text mode
My issue here is that 0 is always being spit back to the console, which I know means the function failed. Anybody notice anything I missed? (I have verified that the image resource is indeed working by loading it in a QLabel)
Bookmarks