hi, i'm quite new to qt and even more to opengl, so please be kind to my mistakes ;-)

for a time critical slideshow program with dynamic zoom and crossfade functionality i have finally found a solution finally that seems to work smooth enough using openGL.

the problem is: when i bind a new texture inside the QGLWidget implementation, the zooming (@ 25fps, called from the window class) stops for a moment. (despite that it works, so this really is the only problem!)

i have already managed to move the loading of the image for the new texture to a different thread.
but trying to call the bindtexture from within this thread, too, doesn't work. it doesn't throw an error, it just doesn't display the texture.

do i have to mess around with QGLcontext (and how would i do that?)
or anythings else? what about the documentation's hint on "that all access to the GL context is safe guarded"? what's that?

some code snippets to give you an idea:

void Thread::init(QPixmap *qpm, GLWidget *glw, GLuint *texture, const QString &fileName)
{
fileNameThr = fileName;
qpmThr = qpm;
glwThr = glw;
texThr = texture;
}

void Thread::run()
{
if (!stopped) {
glwThr->deleteTexture(*texThr);
bool res = qpmThr->load(fileNameThr);
*texThr = glwThr->bindTexture(*qpmThr, GL_TEXTURE_2D);
}
stopped=false;

}

GLWidget::GLWidget(QWidget *parent, QGLWidget *shareWidget)
: QGLWidget(parent, shareWidget)
{
...
qpm = new QPixmap();
load = new Thread(this);
...
}

void GLWidget::paintGL()
{
...
glBindTexture(GL_TEXTURE_2D, texture);
glDrawArrays(GL_TRIANGLE_FAN, 4, 4);

}

Window::Window()
{
imgs[0]="...jpg";
imgs[1]="...jpg";
...
glWidget = new GLWidget(0, 0);
connect(glWidget->load, SIGNAL(finished()), this, SLOT(nextready()));
...
connect(timer0, SIGNAL(timeout()), this, SLOT(next()));
...

}

void Window::next()
{
// trying to pass lots of things to get it working ...
glWidget->load->init(glWidget->qpm, glWidget, &glWidget->texture, imgs[imgCtr]);
glWidget->load->start();
}

void Window::nextready()
{
// if i do the binding of the texture here like this using the function below instead of the thread it works:
// glWidget->next();

// if i try to do this here, it doesn't work either, and wouldn't prevent interrupting anyway
// glWidget->deleteTexture(glWidget->texture);
// glWidget->texture= glWidget->bindTexture(*glWidget->qpm, GL_TEXTURE_2D);
}

void GLWidget::next()
{
deleteTexture(texture);
texture= bindTexture(*qpm, GL_TEXTURE_2D);
}


thanks for help,

oliver