[SDL] yet more glmovie

Gib Bogle bogle at ihug.co.nz
Sat Jul 6 00:58:01 PDT 2002


I have been hitting my head against the wall, trying to see why the
screen display in glmovie doesn't work when the callback is set in
SMPEG_setdisplay().  It appears that in this case there is something
wrong with glTexSubImage2D().

What gets displayed on the screen when using the callback is whatever
was left in the texture last time it was loaded successfully.  That
means if I run glmovie in its non-callback version, and stop it at some
frame, then run the callback version, what I see on the screen is the
last frame displayed in the previous run.

I have looked closely at what is passed to the display function
(glmovie_draw()) when it is invoked from the callback.  There is no
question that the frame pointed to is changing as it should, and there
are no errors generated by any of the OpenGL function calls.

I guess this doesn't prove that glTexSubImage2D is at fault, but it
certainly implies it.  The GL_QUADS generation code clearly works at
least once (or nothing would be displayed), and I'm guessing that it is
working every time, but using an unchanging texture.

I'd appreciate some help from someone who knows more (i.e. anything)
about OpenGL (and SDL).  I would have thought that in the callback case
it is still true that the OpenGL calls are made in the same thread (the
main thread) where SDL video was initialized, and therefore we shouldn't
be running into thread-related problems.

Gib

--------------------------------------------
Gib Bogle              bogle at ihug.co.nz
1/44 Arthur St         Tel: (64-9) 525-6878
Ellerslie, N.Z.        Fax: (64-9) 525-6878
--------------------------------------------




More information about the SDL mailing list