Jeremy,
The problem you describe is very much like what I am doing with VEWL (Virtual Environment Windowing Library) http://cove.opentechinc.com.

We have interactive user interfaces rendered to textures using FrameBufferObjects.

If Cario has an Open GL back-end (capable of rendering 2d with Open GL commands) then the image can be rendered directly on the texture via the graphics card.

Dan


On Jul 28, 2006, at 12:06 PM, Jeremy L. Moles wrote:

I'm looking at integrating the Cairo (http://cairographics.org) vector
graphics library into OSG via osg::Texture*. This will allow me to use
the nice Cairo API (which I am very familiar with) to draw sharp, clean, vector-based HUDS on Textures using OSG. Before I get started though, I
had a few questions regarding OSG and how it handles Textures.

First of all, is going the "texture" route even the most optimal? Cairo
supports many backends, but it's most basic backend is simply an image
buffer with explicit format semantics. My idea was to inherit from
osg::TextureRectangle and implement the Cario API in the subclass, which
in turn will operate on the Texture's internal osg::Image object. This
is all fine and dandy, except I'm not quite sure what to do when a user
wants to change the internal image buffer and have that update the
texture in VRAM. Recreating the texture, obviously, is out of the
question.

I guess my question then is: what is the basic strategy for using a
Texture in OSG as a kind of "interactive" canvas?

glMapBuffer/glUnmapBuffer seems like it would be nice in this case,
though I've only ever seen VBO's used for vertex data. Is this a case
where I need FBO's instead? I don't really know anything about them, but
Googling leads me to believe they could be helpful here. The osg
FrameBufferObject also looks promising, but I'd want someone else to
push me in that direction before I wasted time on something unfruitful.

Sorry if this is a dumb question... :/

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to