[osg-users] Viewer raw pixel data
OpenSceneGraph Users
osg-users at lists.openscenegraph.org
Mon Nov 9 06:59:26 PST 2020
We are in need of wrapping the OSG library inside a vector graphic
environment.
The vector graphic environment doesn't offer any OpenGL functionality in
and of itself, however there is a function in its SDK to create and display
a bitmap image given an array of bytes.
/** Create an image surface from given pixel data.
Data should point to start of top line of bitmap, stride tells how to get
to next line.
For upside down windows bitmaps, data = (pBits-(height-1)*stride) and
stride is a negative number.
@ingroup jsurface
@param data The data. For example, an RGBA image loaded in memory.
@param format The format of the data.
@param width The width of the new surface.
@param height The height of the new surface.
@param stride The number of bytes between the start of rows in the data
buffer.
@param freefun If not NULL, freefun will be called when the surface is
destroyed
@param freearg This will be passed to freefun if/when freefun is called.
@return A pointer to the new surface.
*/
t_jsurface* jgraphics_image_surface_create_for_data(unsigned char *data,
t_jgraphics_format format, int width, int height, int stride, method
freefun, void *freearg);
The question is whether it is possible to extract the graphical output of
the OSG Viewer as raw RGBA bytes. Then we could use the above function to
basically create a pixel dump of the OSG viewer output and have the 2D
vector graphic environment display it.
Thanks for any help
Regards
- Luigi
--
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osg-users+unsubscribe at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/osg-users/1d655ece-f41b-4599-b9a8-30903c42f390n%40googlegroups.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20201109/ab3b4d51/attachment.html>
More information about the osg-users
mailing list