Hello,
I have a SDL/OpenGL aplication where I will need to update some textures using
separate threads.
The problem is that I have to use locks and platform specific code to release
the context and make it current to the threads that update the textures.
I could also create a context per thread and share the textures, but again I
think I would need platform specific code.
Another solution would be to copy the new image to the memory and before
rendering, copy to the texture, but this would mean I need buffers for the
images = more memory, and would make the whole process too slow due to memory
copying: Thread -> Buffer -> Texture, plus locking the buffer.
Is there a better way to solve this problem !?
Any ideas !?
wpr.
Perhaps we could help if you could be a bit more specific about what
task you’re trying to accomplish - it seems to me that there might be a
simpler way of doing things.On Aug 6, 2004, at 3:10 AM, wpr wrote:
Hello,
I have a SDL/OpenGL aplication where I will need to update some
textures using
separate threads.
The problem is that I have to use locks and platform specific code to
release
the context and make it current to the threads that update the
textures.
I could also create a context per thread and share the textures, but
again I
think I would need platform specific code.
Another solution would be to copy the new image to the memory and
before
rendering, copy to the texture, but this would mean I need buffers for
the
images = more memory, and would make the whole process too slow due to
memory
copying: Thread -> Buffer -> Texture, plus locking the buffer.
Is there a better way to solve this problem !?
Any ideas !?
wpr.
SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl
Donny Viszneki <smirk thebuicksix.com> writes:
Perhaps we could help if you could be a bit more specific about what
task you’re trying to accomplish - it seems to me that there might be a
simpler way of doing things.
The thread updates the texture with frames from a movie. The movie will be
displayed somewhere in the scene using the texture.
Sometimes there will be one or more movies and other times none.
wpr.