aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
...
* Fix escape bytes as input bug in ANSI parserJoe Wilm2016-06-06
| | | | | | | There were several unrecognized escape codes that have arguments which were being interpretted as input. Naturally, this caused state to be corrupt. The escape codes are now handled by throwing away the bytes. Consider this a TODO for later.
* Add support for drawing background colorsJoe Wilm2016-06-06
|
* Minor updates to terminal handlingJoe Wilm2016-06-06
| | | | | | | Properly handles goto_col and goto_row. Additionally, input wrapping is handled. Truecolor specs are now set appropriately.
* Handle SIGCHLDJoe Wilm2016-06-06
| | | | Closes alacritty after joining with child process.
* Support dynamic character loadingJoe Wilm2016-06-06
| | | | | | | | | The glyph cache was previously initialized with a list of glyphs from INIT_LIST, and never updated again. This meant that code points not included in that list were not displayed. Now, the glyph cache has gained the ability to load new glyphs at render time. This seems to have lightly decreased performance for some reason.
* Batching flushes on texture changeJoe Wilm2016-06-06
| | | | This fixes a bug when multiple atlases are required.
* Refactor Instanced Drawing to use Vertex ArraysJoe Wilm2016-06-06
| | | | | | | | | | Per-instanced data was previously stored in uniforms. This required several OpenGL calls to upload all of the data, and it was more complex to prepare (several vecs vs one). Additionally, drawing APIs are now accessible through a `RenderApi` (obtained through `QuadRenderer::with_api`) which enables some RAII patterns. Specifically, checks for batch flushing are handled in Drop.
* Optimize Rendering with batched draw callsJoe Wilm2016-06-04
| | | | | Draw calls are now batched for performance. Render times on git log at the default size are now ~200usec.
* Add iterator methods to Grid and Row typesJoe Wilm2016-06-04
| | | | | | | The iterator methods simplify logic in the main grid render function. To disambiguate iterator methods from those returning counts (and to free up names), the `rows()` and `cols()` methods on `Grid` have been renamed to `num_rows()` and `num_cols()`, respectively.
* Optimize renderingJoe Wilm2016-06-04
| | | | | | | | 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.
* Add live-reload for shadersJoe Wilm2016-06-04
| | | | | | | 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.
* render: cleanup active_tex handlingJoe Wilm2016-06-03
| | | | | - Removes a spammy printn! - Sets active_tex to zero wherever gl::BindTexture is called with zero
* Move debug timerJoe Wilm2016-06-03
| | | | It was near the left side; it will be less in-the-way on the right.
* Use texture atlas for glyphsJoe Wilm2016-06-02
| | | | | | This dramatically reduces the number of BindTexture calls needed when rendering the grid. Draw times for a moderately full terminal of the default size are ~1ms with this patch.
* Refactor renderer functions out of main.rsJoe Wilm2016-06-02
| | | | | | | | This moves the rendering logic to draw the grid, to draw strings, and to draw the cursor into the renderere module. In addition to being an organizational improvement, this also allowed for some optimizations managing OpenGL state. Render times for a moderate screen of text dropped from ~10ms to ~4ms.
* Initial support for Terminal Emulation (woo!)Joe Wilm2016-06-02
| | | | | | | | | | | | | | | | This patch introduces basic support for terminal emulation. Basic means commands that don't use paging and are not full screen applications like vim or tmux. Some paging applications are working properly, such as as `git log`. Other pagers work reasonably well as long as the help menu is not accessed. There is now a central Rgb color type which is shared by the renderer, terminal emulation, and the pty parser. The parser no longer owns a Handler. Instead, a mutable reference to a Handler is provided whenever advancing the parser. This resolved some potential ownership issues (eg parser owning the `Term` type would've been unworkable).
* Initial ANSI parser implementationJoe Wilm2016-05-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is the initial terminal stream parsing implementation for Alacritty. There are currently several TODOs, FIXMEs, and unimplemented! things scattered about still, but what's here is good enough to correctly parse my zsh startup. The `Parser` implementation is largely based on the suck-less _simple terminal_ parser. Because this is Rust and Rust has a fantastic type system, some improvements are possible. First, `Parser` is a struct, and its data is stored internally instead of statically. Second, there's no terminal updates hard-coded into the parser. Instead, `Parser` is generic over a `Handler` type which has methods for all of the actions supported by the parser. Because Parser is generic, it should be possible (with proper inlining) to have equivalent performance to the hard-coded version. In addition to using _simple terminal_ as a reference, there's a doc in Alacritty's repository `docs/ansicode.txt`, a summary of the ANSI terminal protocol, which has been referenced extensively. There's probably a large number escapes we don't handle, and that's ok. There's a lot that aren't necessary for everyday terminal usage. If you feel like something that's not supported should be, feel free to add it. Please try not to become overzealous and adding support for sequences only used by folks trapped in 1988.
* Remove old debug "test"Joe Wilm2016-05-28
| | | | | It wasn't actually a test, it was a crappy ascii renderer to show freetype rendered glyphs.
* Implement tty::new()Joe Wilm2016-05-24
| | | | | | | | Opens a pty, forks a child process, and execs the shell defined in user's /etc/passwd file. Bytes from the pty are currently just written to Alacritty's stdout as a sanity check that things are hooked up. Thanks to `st` for some guidance on setting this up.
* Add render time meterJoe Wilm2016-05-21
| | | | Optimization is impossible without measurement!
* Correct sub-pixel font rendering with OpenGLJoe Wilm2016-05-20
| | | | | | | | | 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.
* Use subpixel font renderingJoe Wilm2016-04-11
| | | | | | | OpenGL only supports shared alpha blending. Subpixel font rendering requires using the font RGB values as alpha masks for the corresponding RGB channels. To support this, blending is implemented in the fragment shader.
* Add a GridJoe Wilm2016-04-10
| | | | | | | | The grid holds the state of the terminal with row-major ordering. Eventually, the grid::Cell type will hold other attributes such as color, background color, decorations, and weight. An initialization list is added for common ASCII symbols.
* Rasterizer uses DPI from GlutinJoe Wilm2016-02-27
|
* Font no longer hardcoded in get_glyphJoe Wilm2016-02-27
|
* Fix compiler warningsJoe Wilm2016-02-27
|
* Add support for multiple font faces in rasterizerJoe Wilm2016-02-27
|
* Cleanup PackedVertex initializationJoe Wilm2016-02-27
|
* Implement per vertex structJoe Wilm2016-02-27
|
* Organize buffer data into structJoe Wilm2016-02-26
|
* Fix some compiler warningsJoe Wilm2016-02-25
|
* Move rendering stuff into renderer modJoe Wilm2016-02-25
|
* Abstract glyph rendering, poorlyJoe Wilm2016-02-24
| | | | | Adds a QuadRenderer class that actually only works with glyphs for now. Manually place a few glyphs to demonstrate that it works.
* Bit of cleanupJoe Wilm2016-02-24
| | | | | | | - Commend vertex slice - Add helper for binding mask texture (and specify that it's a mask) - Prefix uniform members of ShaderProgram with u_. This makes it easy to identify in the rest of code.
* Use indexed drawing to draw quadsJoe Wilm2016-02-24
|
* build rect describing glyph quadJoe Wilm2016-02-24
|
* Render the letter JJoe Wilm2016-02-23
| | | | This letter brought to you by OpenGL and freetype.
* Implement very basic glyph rasterizationJoe Wilm2016-02-21
| | | | | There are several assumptions made at this point and very little (no) error handling done.
* implement list_fonts::list_familiesJoe Wilm2016-02-21
| | | | | | | A list of families is returned. Each variant contains the variant's style, the filepath for the variant, and the index of the variant in the file. This info should be enough to get freetype to actually load a font.
* Add function for listing font names on linuxJoe Wilm2016-02-21
| | | | | | 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!).
* Initialize new cargo binary projectJoe Wilm2016-02-21