When I callI get this warning on output:Qt Code:
bindTexture("./sprites/1.bmp");To copy to clipboard, switch view to plain text modeand texture doesn't appear.QGLContext::bindTexture(): not a DDS image file.
But when I calleverything works fine.Qt Code:
bindTexture(pixmap);To copy to clipboard, switch view to plain text mode
What's wrong?


Reply With Quote
bindTexture(QString ) actually expects a DDS file, the DirectDraw Surface file..there is a check inside for this kind of file..if its not, Qt throws a warning and returns from the function, thus nothing happens...where in the one where a pixmap is taken..that pixmap is converted to image which is further used to generate the texture which is then bound to the context..so better use bindTexture with image argument most of the time when u dont have dds image urself..if u have it..use the QString one..

Bookmarks