Mitchell Hashimoto
89a4c59f3c
make opengl loader context-aware
2022-10-23 19:39:02 -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
4ca45936f7
Only reallocate the GPU buffer if our CPU capacity changes
...
Previously, every single render was re-allocating a fairly large (~1MB)
buffer on the GPU. The recommended best practice is to allocate once and
then use `glBufferSubData` to update the memory in-place on the GPU.
We now track the last size we sent to the GPU, compare it to our copy on
the CPU, and if it _grows_ then we reallocate the GPU buffer. If it
shrinks we leave the GPU as-is for now. After this, we use the sub-data
routines to update the data in place.
2022-08-19 10:26:23 -07:00
Mitchell Hashimoto
e2ed1ed745
shader modes, draw a jank cursor
2022-04-19 13:54:50 -07:00
Mitchell Hashimoto
4d9b67fa65
model direct gpu cell
2022-04-15 09:10:32 -07:00
Mitchell Hashimoto
544286509f
grid render a few cells
2022-04-14 17:14:49 -07:00
Mitchell Hashimoto
14e510fe4f
draw text using ebo, some work to be done to clean that up
2022-04-05 08:57:44 -07:00
Mitchell Hashimoto
6ba0a13a9b
opengl: simplify vertex attribute setting
2022-04-05 08:25:36 -07:00
Mitchell Hashimoto
684fb64705
use a font atlas!
2022-04-04 22:24:02 -07:00
Mitchell Hashimoto
d1a24ce89c
opengl: for an array, size is just the size of the type
2022-04-04 13:10:46 -07:00
Mitchell Hashimoto
b4fdfcc264
opengl: a lot more enums
2022-04-04 13:09:39 -07:00
Mitchell Hashimoto
fc28b8c032
busted text rendering
2022-04-04 09:43:46 -07:00
Mitchell Hashimoto
045dd704ec
opengl: more bindings
2022-04-01 18:44:18 -07:00
Mitchell Hashimoto
a5a2196d52
opengl: bound buffers
2022-04-01 18:00:15 -07:00
Mitchell Hashimoto
63673287f6
opengl: more generic setData for buffer
2022-04-01 17:52:36 -07:00
Mitchell Hashimoto
f1cffea944
opengl: buffers
2022-04-01 17:44:54 -07:00