Commit Graph

121 Commits

Author SHA1 Message Date
cdcfe4c13d Use ring.Buffer in textBuf+display only needed chars+show bottom of buffer 2022-07-15 20:54:23 +04:00
4992210bdb Finish ring buffer 2022-07-15 18:48:45 +04:00
65e393542f Starting ring buffer implementation 2022-07-15 17:36:46 +04:00
cd249fcd54 Fixes to write cmdBuf 2022-07-15 15:37:29 +04:00
7f7f90d4c6 Syntax highlighting setup 2022-07-15 15:27:39 +04:00
ecd6bdae3e Tidy 2022-07-15 14:24:36 +04:00
744e9abfb3 Home/End 2022-07-15 13:41:19 +04:00
82acbe939e Proper cursor move and insert/delete operations at cursor 2022-07-15 13:38:33 +04:00
1122d27f57 Remove some stuff 2022-07-12 19:09:11 +04:00
1572ba4743 Std out/in/err of processes 2022-07-12 19:06:03 +04:00
dd09750b04 Simple scroll+better cmd running 2022-07-12 17:22:04 +04:00
755770d3be Basic cmd running 2022-07-12 17:12:20 +04:00
2821505d47 Cmd buffer and text buffer 2022-07-12 16:58:23 +04:00
68962238e2 Ability to input text and show cursor+return last char pos from glyph renderer 2022-07-12 13:10:20 +04:00
8dfedbe030 Debug around pprof 2022-07-12 11:21:47 +04:00
75a4726384 Use nmage v0.12.15 2022-07-11 11:59:29 +04:00
d70a31dd26 Use bufferSubData and dynamic buffer in when drawing glyphs 2022-07-11 11:57:41 +04:00
869bbe3efd Update nmage which optimizes imgui render 2022-07-11 11:42:54 +04:00
38dafbfd65 Fast path shaping non-joining chars 2022-07-11 11:29:12 +04:00
851387d6d8 Fix calcNeededAtlasSize 2022-07-11 11:13:42 +04:00
908ff7e562 Use accurate space advance+correct grid drawing 2022-07-11 09:41:58 +04:00
dec853adca New line height in atlas based on character lengths 2022-07-10 21:49:33 +04:00
f21e1ec201 Fix horizontal positioning by making sure space advance is int 2022-07-10 21:43:04 +04:00
254113c12e Much tighter atlas packing 2022-07-10 21:27:23 +04:00
c84702270e Horizontal position issues was because of the font! Also:
turn GlyphFromRunes into a function and use g.Advance
to have basic support for variable width fonts
2022-07-10 17:24:06 +04:00
dbd77e9ce7 Ensure chars don't overlap in atlas 2022-07-10 14:01:44 +04:00
7fa94806a4 Accurate vertical positioning of text+return fractional bearing/descent 2022-07-10 12:42:31 +04:00
cb2ead0907 Avoid heap allocating in GetTextRuns+Perf notes+pprof by default 2022-07-08 08:44:57 +04:00
d8289139d3 Make TextRun struct to clean GetTextRuns 2022-07-08 08:09:12 +04:00
9388bc0c92 Advance by char width+better debug tools 2022-07-08 07:58:08 +04:00
2da4b7a53d Disable DepthTest when drawing glyphs+move shared glyph draw logic
With depth testing enabled nearby glyphs can z-fight
and so some pixels might be discarded before fragment shader
even runs, which causes us to see only part of a letter.

As such we always draw with blending enabled and depth testing
disabled so that any overlaps simply causes the char pixels to show.
2022-07-08 06:33:20 +04:00
2b71337c4a Remove one pixel offset 2022-07-07 15:38:06 +04:00
16bfe7f05b Use per-char width instead of fixed advance in font atlas
This gives us more (much?) efficient packing of letters
and we load exact size of the letters.

It looks visually a lot better too!
This wasn't good with normal smapling, but using texelFetch its
great.
2022-07-07 15:33:51 +04:00
d23e833b54 Use texelFetch+debug grid in atlas 2022-07-06 17:53:55 +04:00
afcd514f98 Proper runs and glyph shaping. Arabic rendering properly! 2022-07-05 10:42:51 +04:00
ec07b8a256 Parse arabic-shaping for join type information 2022-07-05 08:56:49 +04:00
0368ee9caf Alhamdullah basic arabic rendering :D 2022-07-05 08:20:45 +04:00
ed1ec0d67e Basic run extraction 2022-07-05 07:29:33 +04:00
603409e58e Detect script of runes 2022-07-05 07:12:11 +04:00
c40d1dfdf1 Fix decoding decomp info+include rune equivalence 2022-07-05 06:39:32 +04:00
a762283b1d Alhamdullah start proper unicode support+context aware rendering 2022-07-04 10:16:03 +04:00
0ff7f051f6 Handle tabs 2022-07-04 02:45:59 +04:00
c82fd6aac7 Correct alpha handling in glyph shader 2022-07-04 01:56:47 +04:00
3d7d09744d Don't allocate when drawing by reusing glyp rend buffer 2022-07-04 01:10:37 +04:00
edd8d5b71b Remove commented out code 2022-07-03 22:37:22 +04:00
115310cff7 Use vec2 for glyph model scale 2022-07-03 22:18:37 +04:00
afb5453a3a Make SizeU/SizeV uniforms instead of per-vertex+reduce glyph info 2022-07-03 22:08:40 +04:00
9c09814322 Nice fonts without bleeding at all sizes using tiled atlas 2022-07-03 12:27:16 +04:00
a4b7dfd395 Update texture atlas straight from memory 2022-07-03 09:22:51 +04:00
323cd1099f Move to latest nMage 2022-07-03 09:17:59 +04:00