J. Ryan
01-23-2006, 08:19 AM
Hi all,
I'm a newbie at OpenGl and am learning as I go. For my latest project, I need to get essentially a continuous (or near) stream of "snapshots" (tiff or jpg images) from the screen. This I will display with another program so someone who doesn't have OpenGL on their system can still observe in near real time what the others are doing.
Now, right now I am taking snapshots every second or so by using an implementation of glReadPixels and ultimately saving the data as a tiff image. This works, however it creates a small pause during every snapshot action. While this might be ok once in a while, when doing a snapshot every frame, the whole ball of wax slows down way too much. I realized that part of the problem was that I am doing the bulk of the work in the main graphics thread of the program, thus anything which slows it down slows down the presentation to the user. But when I tried accessing the pixel data from another thread, the timing was off so I got nothing but black pixels.
I'm not very familiar with how this all works, my beginner books don't even mention this stuff. Any help or reference you can offer will be much appreciated!!
-Jess
I'm a newbie at OpenGl and am learning as I go. For my latest project, I need to get essentially a continuous (or near) stream of "snapshots" (tiff or jpg images) from the screen. This I will display with another program so someone who doesn't have OpenGL on their system can still observe in near real time what the others are doing.
Now, right now I am taking snapshots every second or so by using an implementation of glReadPixels and ultimately saving the data as a tiff image. This works, however it creates a small pause during every snapshot action. While this might be ok once in a while, when doing a snapshot every frame, the whole ball of wax slows down way too much. I realized that part of the problem was that I am doing the bulk of the work in the main graphics thread of the program, thus anything which slows it down slows down the presentation to the user. But when I tried accessing the pixel data from another thread, the timing was off so I got nothing but black pixels.
I'm not very familiar with how this all works, my beginner books don't even mention this stuff. Any help or reference you can offer will be much appreciated!!
-Jess