Beauty
18-02-2011 21:19:27
Today somebody added a bug report to our bugtracker.
Thanks to "anonymous" for the notification.
https://bitbucket.org/mogre/mogre/issue ... lay-is-not
Description:
I created an overlay with a text, according to tutorials, font didn't appear.
After 2 days research, I narrowed down to something that I suspect it's an Ogre issue, but since I tested in Mogre, I can't really tell (maybe on 1.7.2 is fixed?)
Basically, if I create the overlay as stand alone, the text does not appear, but whenever I show the default Ogre DebugOverlay, the fonts magically appear, which suggest me that DebugOverlay is initialising some internal variables that affect the rendering of other overlays.
I created a sample code that exposes the problem, it's based on the Example class.
Thanks to "anonymous" for the notification.
https://bitbucket.org/mogre/mogre/issue ... lay-is-not
Description:
I created an overlay with a text, according to tutorials, font didn't appear.
After 2 days research, I narrowed down to something that I suspect it's an Ogre issue, but since I tested in Mogre, I can't really tell (maybe on 1.7.2 is fixed?)
Basically, if I create the overlay as stand alone, the text does not appear, but whenever I show the default Ogre DebugOverlay, the fonts magically appear, which suggest me that DebugOverlay is initialising some internal variables that affect the rendering of other overlays.
I created a sample code that exposes the problem, it's based on the Example class.
public class OverlayMissingText : Example
{
private Mogre.Overlay myOverlay;
public override void CreateFrameListener()
{
base.CreateFrameListener();
//debugOverlay.Hide(); // if this line is commented, the text in myOverlay does not appear, if I enable this line, it appears
}
public override void CreateScene()
{
myOverlay = Mogre.OverlayManager.Singleton.Create("MainOverlay");
Mogre.BorderPanelOverlayElement panel = (Mogre.BorderPanelOverlayElement)Mogre.OverlayManager.Singleton.CreateOverlayElement("BorderPanel", "MainPanel");
panel.MaterialName = "Core/StatsBlockCenter";
panel.MetricsMode = Mogre.GuiMetricsMode.GMM_PIXELS;
panel.Left = panel.Top = 50;
panel.Width = panel.Height = 100;
myOverlay.Add2D(panel);
Mogre.TextAreaOverlayElement textArea = (Mogre.TextAreaOverlayElement)Mogre.OverlayManager.Singleton.CreateOverlayElement("TextArea", "HelloWorld");
textArea.MetricsMode = Mogre.GuiMetricsMode.GMM_PIXELS;
textArea.Top = textArea.Left = 20;
textArea.Caption = "Hello World";
textArea.CharHeight = 16;
textArea.FontName = "BlueHighway";
textArea.Colour = new Mogre.ColourValue(1, 1, 1, 1);
panel.AddChild(textArea);
myOverlay.Show();
}
}