Sure. What you're looking for is called Render To Texture, and there are a variety of OSG Render To Texture examples around that do a variety of things with that rendered texture, like save it to disk, etc.
On Mon, Nov 9, 2020 at 8:44 AM Luigi Castelli <[email protected]> wrote: > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/osg-users/1d655ece-f41b-4599-b9a8-30903c42f390n%40googlegroups.com > <https://groups.google.com/d/msgid/osg-users/1d655ece-f41b-4599-b9a8-30903c42f390n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- Chris 'Xenon' Hanson, omo sanza lettere. [email protected] http://www.alphapixel.com/ Training • Consulting • Contracting 3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 • GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL Legal/IP • Forensics • Imaging • UAVs • GIS • GPS • osgEarth • Terrain • Telemetry • Cryptography • LIDAR • Embedded • Mobile • iPhone/iPad/iOS • Android @alphapixel <https://twitter.com/alphapixel> facebook.com/alphapixel (775) 623-PIXL [7495] -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/osg-users/CAGoufma%3DuHVLZQkN%3D-7gRygYuZrOdpH964BvaDps%3D_fonhVM7A%40mail.gmail.com.
