I'm trying to port some example code which works in Windows to Android, and I'm having an issue with the 'bindtexture' command inside 'QGLWidget'. Immediately after calling the function the error flag 'GL_INVALID_ENUM' is raised and the texture just comes out as a black square.
CheckGLError(__LINE__); glGenTextures(1, &m_combinedTexture); CheckGLError(__LINE__); m_tableTexture = bindTexture(QImage(":/table.png"));//Error is at this point CheckGLError(__LINE__);
My back up plan is to try to load textures using a pixmap, or some traditional openGL code. I'll update this ticket if that works.
If it helps, I'm developing on a Windows 7 PC and debugging on a Galaxy Nexus.
The only other change from the original QT code is that I added the line 'LIBS += -lGLESv2' in the qmake file to get the openGL code to link, and everything else at least seems to work. I can provide example code if need be.
Thanks for your help.
Log in to post a comment.