I'm moving my backend to OSG, but I'm too chicken to do it all at
once. Where would be the best place to run existing code?
The code is a set of texture transfers (individual planes of videos)
and then some drawing with a shader to convert it to floating point RGB.
The transfer code should:
run every single frame, before other operations (resulting textures
get used),
should ideally be split - transfer starts (PBOs) and transfer
completion,
could optionally use a pre-process camera and osg::uniforms,
Can be overlapped with existing rendering (the tail of the previous
drawing) - first phase won't affect textures in use.
Should be done once per GPU (assuming contexts are shared on each card).
Is there a callback or two that would fit? Is it kosher to do the work
in a draw callback, or is there an earlier point that is in the OpenGL
context? Maybe an example?
Since I know the 'best advice' will probably be to bite the bullet, as
a sanity check, I mention that my code is an ffmpeg video channel that
decodes the video into native planes, then transfers multiple planes
and uses a shader and multiple texturing to convert to floating point
and do various color correction etc. I think fitting that into the
existing ImageSequence, which seems to assume single frames of RGB,
would be too time consuming at the moment.
Regards,
Bruce Wheaton
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org