<div>We are in need of wrapping the OSG library inside a vector graphic environment.</div><div>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.</div><div><br></div><div>/**<span class="Apple-tab-span" style="white-space:pre"> </span>Create an image surface from given pixel data.</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>Data should point to start of top line of bitmap, stride tells how to get to next line. </div><div><span class="Apple-tab-span" style="white-space:pre"> </span>For upside down windows bitmaps, data = (pBits-(height-1)*stride) and stride is a negative number.</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>@ingroup<span class="Apple-tab-span" style="white-space:pre"> </span>jsurface</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>@param<span class="Apple-tab-span" style="white-space:pre"> </span>data<span class="Apple-tab-span" style="white-space:pre"> </span>The data. For example, an RGBA image loaded in memory.</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>@param<span class="Apple-tab-span" style="white-space:pre"> </span>format<span class="Apple-tab-span" style="white-space:pre"> </span>The format of the data.</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>@param<span class="Apple-tab-span" style="white-space:pre"> </span>width<span class="Apple-tab-span" style="white-space:pre"> </span>The width of the new surface.</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>@param<span class="Apple-tab-span" style="white-space:pre"> </span>height<span class="Apple-tab-span" style="white-space:pre"> </span>The height of the new surface.</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>@param<span class="Apple-tab-span" style="white-space:pre"> </span>stride<span class="Apple-tab-span" style="white-space:pre"> </span>The number of bytes between the start of rows in the data buffer.</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>@param<span class="Apple-tab-span" style="white-space:pre"> </span>freefun<span class="Apple-tab-span" style="white-space:pre"> </span>If not NULL, freefun will be called when the surface is destroyed</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>@param<span class="Apple-tab-span" style="white-space:pre"> </span>freearg<span class="Apple-tab-span" style="white-space:pre"> </span>This will be passed to freefun if/when freefun is called.</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>@return<span class="Apple-tab-span" style="white-space:pre"> </span>A pointer to the new surface.<span class="Apple-tab-span" style="white-space:pre"> </span></div><div>*/</div><div>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);</div><div><br></div><div>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.</div><div><br></div><div>Thanks for any help</div><div>Regards</div><div><br></div><div>- Luigi</div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:osg-users+unsubscribe@googlegroups.com">osg-users+unsubscribe@googlegroups.com</a>.<br />
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/osg-users/1d655ece-f41b-4599-b9a8-30903c42f390n%40googlegroups.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/osg-users/1d655ece-f41b-4599-b9a8-30903c42f390n%40googlegroups.com</a>.<br />