---------- Initial Header -----------

>From      : [EMAIL PROTECTED]
To          : "users" [email protected]
Cc          :
Date      : Mon, 13 Feb 2006 08:38:31 -0600
Subject : Re: [Opensg-users] SimpleStatisticsForeground:how to move text?


Hi Dirk,

>
>       Hi Antonio,
>
> On Mon, 2006-02-13 at 00:12 +0100, antonio_lioy wrote:
> >
> > Hi Dirk, thanks for your help :-)
> > I need to write some information (like the name of the program, the
> > name of the loaded model ecc...) in one of the walls of my cave. This
> > text must be indipendent of camera and world translations. That's why
> > I would like to use SSF, but if I can't move text, I have to find
> > another way to solve the problem.
>
> You can write the text into an Image (see testTextPixmap.cpp for an
> example) and use that texture with a PolygonForeground to display it.
> That allows you to put it anywhere.
>

This is a good idea, but there is a problem. Using testTextPixmap I obtained an 
ImagePtr of the text I wanna draw:
     ImagePtr imagePtr = face->makeImage(layoutResult, offset);

then I set the foreground:
     ImageForegroundPtr imp = ImageForeground::create(  );
     beginEditCP(imp);
     //NOTE: the position values are between 0 and 1
     //and are relative to the viewport!
     ImagePtr imagePtr = oText->getImage();
     imp->addImage( imagePtr, Pnt2f(0.1,0) );
    endEditCP(imp);

    viewport->getMFForegrounds()->push_back(imp);

But, when I start my program no text is drawn and this error occurs:
WARNING: Window:frameExit: Caught stry OpenGL error not valid enumerator 
(0x500).

Someone can help me? Loading a png as ImagePtr the program works fine, but not 
with the ImagePtr obtained by TextPixmapFace.

Thanks :-)


>
> P.S.: Patrick, the testTextPixmap.cpp gives me some weird results on my
> box, the text seems to be much bigger than the displayed texture. Cna
> you check that and verify it for you? Thanks!
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
> _______________________________________________
> Opensg-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/opensg-users
>



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid3432&bid#0486&dat1642
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to