Exemple #1
0
        static TextRenderer()
        {
            textureAtlas = new TextureAtlas(512, PixelFormat.R8G8B8);
            glyphCache   = new GlyphCache();

            textMaterial = Material.Create(Allocator.GetHeap(), "TextMaterial");
            var mat = textMaterial.Resolve();

            mat.BackfaceCulling = false;
            mat.SetBlending(BlendSource.SourceAlpha, BlendDestination.InverseSourceAlpha);
            mat.SetShader("Text");
            mat.SetTexture(0, textureAtlas.AtlasImageHandle);
            mat.GetTextureUnit(0).WrapMode = TextureWrapMode.ClampToEdge;
        }
Exemple #2
0
        static TextRenderer()
        {
            textureAtlas = new TextureAtlas(512,PixelFormat.R8G8B8);
            glyphCache = new GlyphCache();

            textMaterial = Material.Create(Allocator.GetHeap(), "TextMaterial");
            var mat = textMaterial.Resolve();
            mat.BackfaceCulling = false;
            mat.SetBlending(BlendSource.SourceAlpha, BlendDestination.InverseSourceAlpha);
            mat.SetShader("Text");
            mat.SetTexture(0, textureAtlas.AtlasImageHandle);
            mat.GetTextureUnit(0).WrapMode = TextureWrapMode.ClampToEdge;
        }