Пример #1
0
 public TerrainLayerBaker(string path, int u, int v)
 {
     Diffuse     = new TextureBaker(path, u, v);
     Normal      = new NormalBaker(path, u, v);
     matPath     = string.Format("{0}/mat_{1}{2}.mat", path, u, v);
     IsCompleted = false;
 }
Пример #2
0
        public void BakeText()
        {
            var textureBaker = new TextureBaker(
                RenderManager.GraphicsDevice,
                Area.Width,
                Area.Height,
                TextureBaker.RenderState.Fill);

            var start  = 0;
            var height = 0.0f;

            while (true)
            {
                start = RenderLine(textureBaker, start, height);

                if (start >= Length)
                {
                    RenderedText = textureBaker.GetTexture();
                    return;
                }

                height += Font.LineSpacing;
            }
        }