Hi Toni,

On Mon, 2005-10-10 at 11:33 +0200, Antonio Bleile wrote:
> 
> Indeed, achieving this is really simple:
> 
> ImageForegroungPtr overlay = ImageForeground::create();
> ImagePtr logo = Image::create();
> 
> logo->read( "logo.png" );
> overlay->addImage( logo, Pnt2f(0,0) );
> 
> beginEditCP(vp);
>   vp->getForegrounds().push_back(overlay);    
> endEditCP  (vp);
> 
> Thank you (I start liking OpenSG :-)

And if you add a couple more begin/endEdit()s (for the logo and overlay)
OpenSG will like you, too. ;) If you're worried about performance
(because this does use glDrawPixels()), you put your Image into a
Texture and use the PolygonForeground Andreas mentioned.
                
> P.S.: Can I set only the the relative position
> of my overlay with "addImage"? Can't I just 
> specify pixel coords?

At this time, no. You're welcome to add that, just look at
ImageForeground::draw(), it's pretty trivial. I'd recommend using the
Viewport convention (coords <=1 are relative, coords > 1 are absolute).

Yours
        
        Dirk




-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to