mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-10-16 23:06:20 +00:00
renderer: unify image.zig
The code in metal/image.zig and opengl/image.zig was virtually identical save for the texture options, so I've moved that to the GraphicsAPI and unified them in to renderer/image.zig
This commit is contained in:
@@ -14,6 +14,10 @@ const link = @import("link.zig");
|
||||
const cellpkg = @import("cell.zig");
|
||||
const fgMode = cellpkg.fgMode;
|
||||
const isCovering = cellpkg.isCovering;
|
||||
const imagepkg = @import("image.zig");
|
||||
const Image = imagepkg.Image;
|
||||
const ImageMap = imagepkg.ImageMap;
|
||||
const ImagePlacementList = std.ArrayListUnmanaged(imagepkg.Placement);
|
||||
const shadertoy = @import("shadertoy.zig");
|
||||
const assert = std.debug.assert;
|
||||
const Allocator = std.mem.Allocator;
|
||||
@@ -78,16 +82,10 @@ pub fn Renderer(comptime GraphicsAPI: type) type {
|
||||
const Buffer = GraphicsAPI.Buffer;
|
||||
const Texture = GraphicsAPI.Texture;
|
||||
const RenderPass = GraphicsAPI.RenderPass;
|
||||
|
||||
const shaderpkg = GraphicsAPI.shaders;
|
||||
|
||||
const imagepkg = GraphicsAPI.imagepkg;
|
||||
const Image = imagepkg.Image;
|
||||
const ImageMap = imagepkg.ImageMap;
|
||||
|
||||
const Shaders = shaderpkg.Shaders;
|
||||
|
||||
const ImagePlacementList = std.ArrayListUnmanaged(imagepkg.Placement);
|
||||
|
||||
/// Allocator that can be used
|
||||
alloc: std.mem.Allocator,
|
||||
|
||||
|
Reference in New Issue
Block a user