[osg-users] osgText background

Frauciel Luc L.Frauciel at brgm.fr
Thu Jul 10 00:43:51 PDT 2008


I've done something like that.
Each time I change the text, I recompute the geometry (quad) based on the Text's Drawable getBound().
It works for plane aligned text (xy, xz or yz). If you want to do that for screen aligned text, you'll probably have to look osgText code to have the exact size of the Text in screen coordinates.
I would not use a billboard in your case, since you'll find difficult to have a billboard with a center of rotation that match with your text (especially if the text is dynamic). Try of quad in a HUD, with screen coordinates extracted from your text, and something smart with z-buffer parameters to have your text over your quad :)
 
  Luc
 

Luc FRAUCIEL - BRGM
Unité Calcul, 3D et réalité virtuelle
Service Systèmes et Technologies de l'Information
3, av C. Guillemin BP 36009 - 45060 Orléans Cedex 2, France
Tél. 02 38 64 35 65
Fax 02 38 64 39 70 

 


________________________________

	De : osg-users-bounces at lists.openscenegraph.org [mailto:osg-users-bounces at lists.openscenegraph.org] De la part de Vincent Bourdier
	Envoyé : jeudi 10 juillet 2008 09:24
	À : osg
	Objet : Re: [osg-users] osgText background
	
	
	Just a little up
	
	No one has ever tried to put a background on a osgText ?  
	
	Thanks
	Vincent.
	
	
	2008/7/9 Vincent Bourdier <vincent.bourdier at gmail.com>:
	

		Hi all,
		
		I'm looking at a way to put a geometry (planar surface) as background of an osgText...
		
		I was thinking on a mix between billboard geode, and something else to manage the geometry to have the size constant in screen coordinates... but no way to do it as simply as osgText !
		
		Is there any implementation approaching what I intend to do ? I hope yes...
		
		else...
		Am I obliged to implement my self something from zero ? any idea to do it more faster ?
		Is it interesting for OSG to have this as a new feature for osgText::text ?
		
		thanks,
		
		regards,
		
		Vincent
		
		


**********************************************************************************************

Pensez à l'environnement avant d'imprimer ce message
 Think Environment before printing
 
Le contenu de ce mél et de ses pièces jointes est destiné à l'usage exclusif du (des) destinataire(s) désigné
(s) 
comme tel(s). 
En cas de réception par erreur, le signaler à son expéditeur et ne pas en divulguer le contenu. 
L'absence de virus a été vérifiée à l'émission, il convient néanmoins de s'assurer de l'absence de 
contamination à sa réception.
 
The contents of this email and any attachments areconfidential. They are intended for the named recipient
(s) 
only. 
If you have received this email in error please notifythe system manager or the sender immediately and do 
not 
disclose the contents to anyone or make copies. 
eSafe scanned this email for viruses, vandals and malicious content.
 
**********************************************************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20080710/23aa605f/attachment-0003.htm>


More information about the osg-users mailing list