Mitchell Hashimoto
c2ce158342
remove the max timer
2022-10-24 10:55:16 -07:00
Mitchell Hashimoto
c0f96f591b
remove render timer from window
2022-10-24 10:50:42 -07:00
Mitchell Hashimoto
536f5c4487
set proper opengl background
2022-10-24 10:04:40 -07:00
Mitchell Hashimoto
b4859625bf
bring back out of focus no blink
2022-10-24 10:01:38 -07:00
Mitchell Hashimoto
dc908cb73d
support screen size, rip out shared state
2022-10-24 09:52:08 -07:00
Mitchell Hashimoto
45ff936ddf
no longer store grid size on the renderer
2022-10-24 09:32:51 -07:00
Mitchell Hashimoto
ce384c2356
renderer: extract the size structs to a shared file
2022-10-24 09:27:09 -07:00
Mitchell Hashimoto
aa3d132947
run rendering on another real thread (still bugs)
2022-10-24 09:17:48 -07:00
Mitchell Hashimoto
77b981950c
pkg/libuv: Idle handles
2022-10-23 21:15:58 -07:00
Mitchell Hashimoto
aeb592bae9
move to new renderstate, new render method
2022-10-23 21:04:52 -07:00
Mitchell Hashimoto
b347ff458b
prepare our render state on the window
2022-10-23 20:55:04 -07:00
Mitchell Hashimoto
9913bba2e8
introduce renderer thread logic (not starting it yet)
2022-10-23 20:18:10 -07:00
Mitchell Hashimoto
89a4c59f3c
make opengl loader context-aware
2022-10-23 19:39:02 -07:00
Mitchell Hashimoto
de9731da1f
rename grid to a renderer, extract to subfolder
...
"Grid" was a really antiquated name when it had both the screen state
AND the renderering functionality tied together. This hasn't been true
for a LONG time and it is long overdue that this is renamed to its
proper name.
This also begins setting up a folder structure to anticipate future
renderers and rendering functionality. I'm not working on any alternate
renderers right now so the interface isn't expected to be good, just
laying out the files in this way.
2022-10-23 16:47:34 -07:00
Mitchell Hashimoto
c3d9ee1d85
pkg/libuv: get rid of sleep state, it did nothing
2022-10-23 16:15:47 -07:00
Mitchell Hashimoto
34e1c96dd7
workaround for https://github.com/ziglang/zig/issues/13277
2022-10-23 11:39:21 -07:00
Mitchell Hashimoto
bc3762e85b
update zig to latest, fix todos
2022-10-23 10:54:39 -07:00
Mitchell Hashimoto
79f69885ca
update to latest zig which renames @min/@max
2022-10-19 10:42:31 -07:00
Mitchell Hashimoto
366ea2ff4c
cell under cursor always remains visible by inverting fg colors
2022-10-18 15:28:31 -07:00
Mitchell Hashimoto
fa0028f104
coretext: rasterize glyph with a padding to prevent artifacting
2022-10-18 14:57:44 -07:00
Mitchell Hashimoto
c00c8f52b5
coretext: render glyph on its own bounding box, calculate bearings
2022-10-18 14:49:23 -07:00
Mitchell Hashimoto
38e0c258d0
coretext: we do want to smooth and anti-alias glyphs
2022-10-18 12:56:02 -07:00
Mitchell Hashimoto
4669032e56
face: coretext zero the bitmap before render
2022-10-18 12:52:37 -07:00
Mitchell Hashimoto
58c107dceb
freetype: resize glyphs that are too tall prior to storing in texture
...
Most emoji fonts are massive glyphs (128x128, 256x256, etc.). This means
the texture we need to store emoji is also massive. For a 128x128 emoji
font (both Apple and Noto), we can only store 12 emoji before resizing
prior to this commit.
This commit now threads through a max height through to the font face
and resizes the bitmap in memory before putting it in the atlas. This
results in significant savings. The max height is the cell height. We
allow the glyphs to be as wide as necessary due to double (and more)
wide glyphs.
For the unicode emoji test file, the atlas size before and after:
Before: 262 MB
After: 16 MB
2022-10-17 19:14:30 -07:00
Mitchell Hashimoto
c103a278f1
render font info in dev mode
2022-10-17 14:47:51 -07:00
Mitchell Hashimoto
7cb3f2267f
use our built-in font for dev mode
2022-10-17 11:56:46 -07:00
Mitchell Hashimoto
20f1077e86
enable freetype with imgui
2022-10-17 11:41:46 -07:00
Mitchell Hashimoto
ab721b5b26
disable inputs when they're captured by dev mode
2022-10-17 11:19:35 -07:00
Mitchell Hashimoto
15a57983a6
pkg/freetype: remove unused API
2022-10-16 21:03:17 -07:00
Mitchell Hashimoto
a39fe6baed
Use scalable check rather than fixed size check for setting char size
2022-10-16 20:55:06 -07:00
Mitchell Hashimoto
2e1bc7bb01
Bring back freetype font bitmap conversion
...
Monaco on Mac is mono
2022-10-16 20:47:21 -07:00
Mitchell Hashimoto
9d37458ed8
update zig
2022-10-16 19:47:43 -07:00
Mitchell Hashimoto
f29393bca6
Imgui ( #20 )
...
* vendor/cimgui
* Add a "dev mode" window which for now is just imgui demo
2022-10-16 16:20:08 -07:00
Mitchell Hashimoto
ddfb1dec4b
Switch to stage2 primarily for builds
2022-10-15 15:00:41 -07:00
Mitchell Hashimoto
5b6eb2736a
pkg/libpng: name the lib png, so its not "liblibpng"
2022-10-15 14:55:11 -07:00
Mitchell Hashimoto
53d00ee8a2
update zig which fixes test on wide terminals
2022-10-15 14:36:15 -07:00
Mitchell Hashimoto
2d10ac0a77
opengl: setting buffer data with array must get proper pointer
...
This finally gets the terminal compiling with the self-hosted Zig
compiler! Wow! And this was one of those things that... should've never
worked.
2022-10-15 11:29:25 -07:00
Mitchell Hashimoto
c681a197d2
use old version of mach
2022-10-15 10:56:23 -07:00
Mitchell Hashimoto
846c9db0c3
get rid of stage2 workaround for now
2022-10-15 10:43:39 -07:00
Mitchell Hashimoto
56c9979db5
run tests against both stage1 and stage2
2022-10-14 10:05:13 -07:00
Mitchell Hashimoto
33f51f1f3d
update zig
2022-10-14 10:04:26 -07:00
Mitchell Hashimoto
6c84199b84
fix more stage2 build errors
2022-10-14 10:01:41 -07:00
Mitchell Hashimoto
83c9390ac9
pkg/libuv: workaround stage2 issue
2022-10-14 09:57:52 -07:00
Mitchell Hashimoto
a1087af7c8
Workaround stage2 compile issue with issue link
2022-10-14 09:56:53 -07:00
Mitchell Hashimoto
e324e38352
workaround stage2 translate-c issue with link to issue
2022-10-14 09:53:23 -07:00
Mitchell Hashimoto
b28b04d710
pkg/libuv: fix stage2 compilation issues
2022-10-14 09:44:22 -07:00
Mitchell Hashimoto
2d3febac0e
fix invalid ptrcast
2022-10-14 09:19:58 -07:00
Mitchell Hashimoto
c99fb89738
new opengl function calls for stage2
2022-10-14 09:18:33 -07:00
Mitchell Hashimoto
e73db24f0e
move shaders into src/ tree for stage2
2022-10-14 09:18:20 -07:00
Mitchell Hashimoto
8decfa6452
I think this gets us on master zig...
2022-10-13 11:31:02 -07:00