summaryrefslogtreecommitdiff
path: root/pkg/opengl
AgeCommit message (Collapse)Author
2025-09-18renderer: create explicit sampler state for custom shadersMitchell Hashimoto
The GLSL to MSL conversion process uses a passed-in sampler state for the `iChannel0` parameter and we weren't providing it. This magically worked on Apple Silicon for unknown reasons but failed on Intel GPUs. In normal, hand-written MSL, we'd explicitly create the sampler state as a normal variable (we do this in `shaders.metal` already!), but the Shadertoy conversion stuff doesn't do this, probably because the exact sampler parameters can't be safely known. This fixes a Metal validation error when using custom shaders: ``` -[MTLDebugRenderCommandEncoder validateCommonDrawErrors:]:5970: failed assertion `Draw Errors Validation Fragment Function(main0): missing Sampler binding at index 0 for iChannel0Smplr[0]. ```
2025-07-05renderer/opengl: explicit texture optionsQwerasd
This sets up for a couple improvments (see TODO comments) and also sets the glyph atlas textures to nearest neighbor sampling since we can do that now that we never scale glyphs.
2025-06-25renderer/OpenGL: use compressed texture formats for imagesQwerasd
BPTC is required to be available OpenGL >= 4.2 and our minimum is 4.3 so this is safe in terms of support. I tested briefly in a VM and didn't encounter any problems so this should just be a complete win. (Note: texture data is already automatically compressed on Metal)
2025-06-20style(renderer): explicit error setsQwerasd
2025-06-20renderer: big rework, graphics API abstraction layers, unified logicQwerasd
This commit is very large, representing about a month of work with many interdependent changes that don't separate cleanly in to atomic commits. The main change here is unifying the renderer logic to a single generic renderer, implemented on top of an abstraction layer over OpenGL/Metal. I'll write a more complete summary of the changes in the description of the PR.
2025-05-15fix(OpenGL): use sRGB texture format for gamma correct interpolationQwerasd
otherwise images will be too dark when scaled
2025-05-07core: fixup callconv(.C) -> callconv(.c)Jeffrey C. Ollie
https://ziglang.org/download/0.14.0/release-notes.html#Calling-Convention-Enhancements-and-setAlignStack-Replaced
2025-03-18ci: zig fmt checkMitchell Hashimoto
This adds a CI test to ensure that all Zig files are properly formatted. This avoids unrelated diff noise in future PRs.
2025-03-12fix mach-glfw on windowsMitchell Hashimoto
2025-03-12more fixesMitchell Hashimoto
2025-01-23use main buffer and copy data to fbo texture (opengl) (#5294)Julia
NEEDS REVIEW continuation of #5037 resolves #4729 renders all shaders to the default buffer and then copies it to the designated custom shader texture. this is a draft pr because: - it introduces a new shader "pipeline" which doesnt fit in with how the system was designed to work (which is only rendering to the fbo) - im not sure if this is the best way to achieve shaders being able to sample their output while also drawing to the screen. the cusom fbo (previous implementation) was useful in that it modularized the custom shader stage in rendering --------- Co-authored-by: Mitchell Hashimoto <m@mitchellh.com>
2024-08-16pkg/opengl: yeet usingnsMitchell Hashimoto
2024-08-03renderer: disable window-padding-color=extend in certain scenariosMitchell Hashimoto
There are scenarios where this configuration looks bad. This commit introduces some heuristics to prevent it. Here are the heuristics: * Extension is always enabled on alt screen. * Extension is disabled if a row contains any default bg color. The thinking is that in this scenario, using the default bg color looks just fine. * Extension is disabled if a row is marked as a prompt (using semantic prompt sequences). The thinking here is that prompts often contain perfect fit glyphs such as Powerline glyphs and those look bad when extended. This introduces some CPU cost to the extension feature but it should be minimal and respects dirty tracking. This is unfortunate but the feature makes many terminal scenarios look much better and the performance cost is minimal so I believe it is worth it. Further heuristics are likely warranted but this should be a good starting set.
2024-06-24begin 0.13 update process -- very brokenMitchell Hashimoto
2024-01-07Add include paths to more modules in pkg/Krzysztof Wolicki
2024-01-03WIP: Update to new build module API after Zig PR #18160Krzysztof Wolicki
Temporarily change dependency sources to forks until they update
2023-11-19renderer/opengl: upload kitty image texturesMitchell Hashimoto
2023-11-17renderer/opengl: create the screen textureMitchell Hashimoto
2023-11-17renderer/opengl: setup uniform buffer objects for custom shadersMitchell Hashimoto
2023-11-17renderer/opengl: create ubosMitchell Hashimoto
2023-11-17renderer/opengl: extract cell program state to dedicated structMitchell Hashimoto
2023-11-17pkg/opengl: add Framebuffer APIsMitchell Hashimoto
2023-11-17renderer/opengl: move opengl API to pkg/openglMitchell Hashimoto