Commit Graph

14 Commits

Author SHA1 Message Date
Joe Wilm 8566e17860
Fix all trivial compiler warnings
Of note are the `ansi` and `grid` modules becoming public. There are
several bits of unused code in each of these. In the case of `grid`, the
unused parts are generally useful, like some indexing implementations.
In ansi, there are pieces that will be used once the parser is more
complete. In any case, these modules are fairly generic and mostly
usable outside of Alacritty.

Unused cargo packages were also removed.
2016-06-09 08:30:55 -07:00
Joe Wilm cdea958e71
Add support for drawing background colors 2016-06-06 16:54:15 -07:00
Joe Wilm 1f3f9add49
Optimize Rendering with batched draw calls
Draw calls are now batched for performance. Render times on git log at
the default size are now ~200usec.
2016-06-04 21:31:41 -07:00
Joe Wilm 2f058bd053
Optimize rendering
This moves some logic that was previously being done per-character into
the vertex shader. At this time, we've traded CPU computation for
additional gl::Uniform2f calls. This is only a marginal improvement.
However, this patch positions the renderer well for instanced drawing,
and that will be a huge performance win.
2016-06-04 15:30:17 -07:00
Joe Wilm f944b517fa
Add live-reload for shaders
Recompiling the entire program whenever a shader changes is slow, and it
can interrupt flow. Shader reloads are essentially instantaneous now. If
the new shader fails to compile, no state is changed; the previous
program continues to be used.
2016-06-04 10:54:33 -07:00
Joe Wilm a8024f64c7
Update Cargo dependencies
Most importantly, freetype-rs was updated to use freetype-sys 0.4 which
includes the LCD_FILTER apis.
2016-06-02 19:54:16 -07:00
Joe Wilm c70acbac0b
Correct sub-pixel font rendering with OpenGL
Uses the GL_ARB_blend_func_extended to get single-pass, per-channel
alpha blending. gl_generator is now used instead of gl to enable the
extension.

The background color is removed since that presumably needs to run in a
separate pass.
2016-05-20 21:36:28 -07:00
Joe Wilm c8b69412b2 Rasterizer uses DPI from Glutin 2016-02-27 20:26:31 -08:00
Joe Wilm 400e4c92a7 build rect describing glyph quad 2016-02-24 19:08:57 -08:00
Joe Wilm 9f8aa9c315 Add license 2016-02-23 20:59:31 -08:00
Joe Wilm 2b7caf95fd Render the letter J
This letter brought to you by OpenGL and freetype.
2016-02-23 20:42:58 -08:00
Joe Wilm 5040c44f67 Implement very basic glyph rasterization
There are several assumptions made at this point and very little (no)
error handling done.
2016-02-21 19:45:35 -08:00
Joe Wilm 2a7dc1deb8 Add function for listing font names on linux
This function isn't exactly useful, but it's working ffi with the
fontconfig library. Woo! Next step will be returning some objects with
more information (like font path so we can start rendering glyphs!).
2016-02-21 15:20:03 -08:00
Joe Wilm 621776cd94 Initialize new cargo binary project 2016-02-21 08:15:41 -08:00