コード例 #1
0
 public TextRenderState(TextureManager textureManager)
 {
     _textureManager = textureManager;
     _font = new Font(textureManager.Get("font"),
         FontParser.Parse("font.fnt"));
     _helloWorld = new Text("Hello", _font);
 }
コード例 #2
0
        public DrawSpriteState(TextureManager textureManager)
        {
            _textureManager = textureManager;
            Texture texture = _textureManager.Get("face_alpha");
            Gl.glEnable(Gl.GL_TEXTURE_2D);
            Gl.glBindTexture(Gl.GL_TEXTURE_2D, texture.Id);
            Gl.glEnable(Gl.GL_BLEND);
            Gl.glBlendFunc(Gl.GL_SRC_ALPHA, Gl.GL_ONE_MINUS_SRC_ALPHA);

        }
コード例 #3
0
        public TextTestState(TextureManager textureManager)
        {
            _text.Texture = textureManager.Get("font");

            // Uncomment this to set the U,Vs around only one letter '$'
            //_text.SetUVs(new Point(0.113f, 0), new Point(0.171f, 0.101f));

            // Uncomment these lines to set the '$' character to the correct size
            //_text.SetWidth(15);
            //_text.SetHeight(26);

        }