[gameprogrammer] OpenGL + SDL + multi-threading + Theora

Hi, every one

I am working on an application that can play theora ogg file using
OpenGL and SDL, and I looked at the Nebula Device 2 nOggTheoraplayer
class at this link:

http://nebuladevice.cubik.org/documentation/nebula2/classnOggTheoraPlayer.shtml

and build my class the same way they build it, but the problem is that
I don't know how to play the video with such heirarcy.
so I decide to create a thread that decode the video frames and render
the decoded frames to a texture, and in the main thread I will render
this texture to the screen for every frame.

the problem is that I created the texture in the main thread and then
I created the thread that will render to this texture, and when I want
to render to this texture I call the following code to be sure that
the texture has been created:

     assert(glIsTexture(texture_id));

when the application run the assertion will cut the program indecating
that the texture isn't valid, so why does that happend?!! I am sure
that I create the texture in the main thread with the same id, so what
I can do to solve this?

---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html


Other related posts: