public CoordinateSystem() { // Load shader sdr = new GLShader(new string[] { COORDINATE_SYSTEM_SHADER.VS }, new string[] { COORDINATE_SYSTEM_SHADER.FS }); sdr_colorModeParam = sdr.GetUniformLocation("ColorMode"); // Load texture tex = GLTexture2D.FromFile(Global.EXE_DIR + "arrow.png"); }
public GLTextFont(string filename, Vector2 charsize, GLMesh meshquad) { this.texture = GLTexture2D.FromFile(filename); this.charsize = charsize; this.meshquad = meshquad; if (fontshader == null) { fontshader = new GLShader(new string[] { FONT_SHADER.VS }, new string[] { FONT_SHADER.FS }); fontshader_coloruniform = fontshader.GetUniformLocation("Color"); } }
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"); } }
public GLButton(string texfilename, Rectangle bounds, AnchorStyles anchor = AnchorStyles.Top | AnchorStyles.Left, string actionname = null, string actiondesc = null) { this.Anchor = anchor; this.tex = GLTexture2D.FromFile(texfilename, false); if (actionname != null) { clickAction = ActionManager.CreateAction(actiondesc == null ? "" : actiondesc, actionname, this, "ClickInternal"); } if (bounds.Width <= 0) { bounds.Width = tex.width; } if (bounds.Height <= 0) { bounds.Height = tex.height; } this.Bounds = bounds; }