public SimpleFontHandler(Font font, string text, Vector2f position, Color4f color) { this.font = font; this.position = position; this.color = color; this.text = text; }
public Face(Vector3f[] vertices, Vector2f[] textureVertices, Vector3f[] normalVertices, int polygonType) { this.vertices = vertices; this.textureVertices = textureVertices; this.normalVertices = normalVertices; this.polygonType = polygonType; }
public BillboardedQuad(Texture texture, Camera activeCamera, Vector3f position, Vector2f size) { this.texture = texture; this.position = position; this.size = size; this.camera = activeCamera; if (displayList == -1) createDisplayList(); }
public MultiTexturedQuad(Texture t0, Texture t1, Texture t2, Vector2f pos) { this.pos = pos; this.width = 1.0f; this.height = 1.0f; this.t0 = t0; this.t1 = t1; this.t2 = t2; c = new Color4f(1.0f, 1.0f, 1.0f, 1.0f); }
public void Draw(string text, Vector2f position, Color4f color) { string[] rows = text.Split('\n'); Gl.glPushMatrix(); Gl.glColor4f(color.r, color.g, color.b, color.a); Gl.glTranslatef(position.x, position.y, 0.0f); for (int i = 0; i < rows.Length; i++) { font.Render(rows[i]); Gl.glTranslatef(0.0f, -fontSize, 0.0f); } Gl.glPopMatrix(); }
public Vector2f subtract(Vector2f dest) { return new Vector2f(x - dest.x, y - dest.y); }
public void set(Vector2f src) { set(src.x, src.y); }
public Vector2f divides(Vector2f lower) { return new Vector2f(x / lower.x, y / lower.y); }
public Vector2f add(Vector2f dest) { return new Vector2f(x + dest.x, y + dest.y); }
public void Draw(string Text, Vector2f position, Color4f Color) { Gl.glBlendFunc(Gl.GL_ONE, Gl.GL_ONE); char[] TextCharArray = Text.ToCharArray(); int LastIndex = 0; List<char[]> SubTextArrays = new List<char[]>(); for (int i = 0; i < TextCharArray.Length; i++) { if (TextCharArray[i] == '\n') { SubTextArrays.Add(Text.Substring(LastIndex, i - LastIndex).ToCharArray()); LastIndex = i + 1; } } SubTextArrays.Add(Text.Substring(LastIndex, Text.Length - LastIndex).ToCharArray()); for (int i = 0; i < SubTextArrays.Count; i++) { DrawCharArray(SubTextArrays[i], position.x, position.y - (this.FontSize * i), Color); } Gl.glBlendFunc(Gl.GL_SRC_ALPHA, Gl.GL_ONE_MINUS_SRC_ALPHA); }