
Originally Posted by
wysota
I would start with:
Thank you. This solved the problem:
void GlWidget
::pixmapCatchFromForm(QByteArray bytes
) {
image->loadFromData(bytes, "PNG");
texture = bindTexture(*image);
qDebug() << texture; // returns 1
updateGL();
}
void GlWidget::pixmapCatchFromForm(QByteArray bytes)
{
image->loadFromData(bytes, "PNG");
texture = bindTexture(*image);
qDebug() << texture; // returns 1
updateGL();
}
To copy to clipboard, switch view to plain text mode
One thing I am very curious about is what keeps the CPU so busy. In my program, I have a timer which triggers every 40 ms, shoots screen and signals it to glWidget which is responsible for creating a texture from that screen shot. The program uses up to 90% of CPU. even without texturing! a simple timer and a screen shot grabWidget function takes up to 90%, I do not understand why!
Bookmarks