public void Draw(TextHandle handle) { VboTextHandle vbo = (VboTextHandle)handle; //GL.PushClientAttrib(ClientAttribMask.ClientVertexArrayBit); //GL.EnableClientState(EnableCap.TextureCoordArray); GL.EnableClientState(EnableCap.VertexArray); GL.BindBuffer(BufferTarget.ArrayBuffer, vbo.vbo_id); GL.BindBuffer(BufferTarget.ElementArrayBuffer, vbo.ebo_id); GL.TexCoordPointer(2, TexCoordPointerType.Float, vector2_size, (IntPtr)vector2_size); GL.VertexPointer(2, VertexPointerType.Float, vector2_size, IntPtr.Zero); GL.DrawElements(BeginMode.Triangles, vbo.element_count, DrawElementsType.UnsignedShort, IntPtr.Zero); //GL.DrawArrays(BeginMode.LineLoop, 0, vbo.element_count); GL.BindBuffer(BufferTarget.ArrayBuffer, 0); GL.BindBuffer(BufferTarget.ElementArrayBuffer, 0); GL.DisableClientState(EnableCap.VertexArray); //GL.DisableClientState(EnableCap.TextureCoordArray); //GL.PopClientAttrib(); }
public void Draw(TextHandle handle) { GL.CallList(handle.Handle); }
public void Prepare(string text, TextureFont font, out TextHandle handle) { handle = new TextHandle(text, font.font); }
public void Draw(TextHandle handle) { Print(handle.Text, handle.GdiPFont, Color.White); }