示例#1
0
        public GLNumberFont(string filename, FontDefinition fontDefinition, GLMesh meshquad, bool isFixedWidth)
        {
            this.texture    = GLTexture2D.FromFile(filename);
            this.fontdef    = fontDefinition;
            this.meshquad   = meshquad;
            this.fixedwidth = /*isFixedWidth ? fontdef[0][10] / 10 :*/ 0;

            if (fontshader == null)
            {
                fontshader = new GLShader(new string[] { FONT_SHADER.VS }, new string[] { FONT_SHADER.FS });
                fontshader_coloruniform = fontshader.GetUniformLocation("Color");
            }
        }
示例#2
0
		public GLNumberFont(string filename, FontDefinition fontDefinition, GLMesh meshquad, bool isFixedWidth)
		{
			this.texture = GLTexture2D.FromFile(filename);
			this.fontdef = fontDefinition;
			this.meshquad = meshquad;
			this.fixedwidth = /*isFixedWidth ? fontdef[0][10] / 10 :*/ 0;

			if(fontshader == null)
			{
				fontshader = new GLShader(new string[] { FONT_SHADER.VS }, new string[] { FONT_SHADER.FS });
				fontshader_coloruniform = fontshader.GetUniformLocation("Color");
			}
		}