Hola compañeros:
Estoy intentando crear dinámicamente un texto con GLScene pero este no se me visualiza por pantalla. El código es el sigiuente:
Código:
//Creamos una clase que contiene los siguientes atributos
IDGraph : TGLHUDText; //Texto
GraphStoredBitmapFont: TGLStoredBitmapFont;//Biblioteca para el tratamiento de texto
//En el constructor ponemos
//Creamos el editor de texto
self.GraphStoredBitmapFont:=TGLStoredBitmapFont.Create(self);
self.GraphStoredBitmapFont.Font.Charset:=ANSI_CHARSET;
self.GraphStoredBitmapFont.Font.Color:=clWhite;
self.GraphStoredBitmapFont.Font.Height:=-11;
self.GraphStoredBitmapFont.Font.Name:='Verdana';
self.GraphStoredBitmapFont.Font.Size:=8;
self.GraphStoredBitmapFont.Font.Style:=[fsBold,fsItalic];
self.GraphStoredBitmapFont.Ranges[0].StartASCII:=#32;
self.GraphStoredBitmapFont.Ranges[0].StartGlyphIdx:=0;
self.GraphStoredBitmapFont.Ranges[0].StopASCII:='}';
//Creamos el texto
self.IDGraph := TGLHUDText.Create(self.scene.Objects.AddNewChild(TGLHUDText));
self.IDGraph.Text:='Graph';
self.IDGraph.Position.SetPoint(0,0,0);
self.IDGraph.Visible:=True;
self.IDGraph.BitmapFont := self.GraphStoredBitmapFont;
self.IDGraph.Alignment := taLeftJustify;
self.IDGraph.Layout := tlTop;
self.IDGraph.ModulateColor.AsWinColor:=clWhite;
self.IDGraph.Scale.SetVector(1,1,1);
self.IDGraph.Up.SetVector(0,1,0);
Si creo el texto estáticamente desde el editor del GLScene funciona perfectamente pero dinámicamente no me deja.
Soy capaz de crear dinámicamente una tetera, planos, lineas, etc...pero el texto soy incapaz y no sé porqué, cualquier ayuda sería de agradecer.
Sin más muchas gracias.