mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-10-16 14:56:10 +00:00
renderer/OpenGL: use compressed texture formats for images
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)
This commit is contained in:

committed by
Mitchell Hashimoto

parent
da46a47726
commit
5cb175ff63
@@ -395,7 +395,7 @@ pub inline fn textureOptions(self: OpenGL) Texture.Options {
|
||||
_ = self;
|
||||
return .{
|
||||
.format = .rgba,
|
||||
.internal_format = .srgba,
|
||||
.internal_format = .srgba_compressed,
|
||||
.target = .@"2D",
|
||||
};
|
||||
}
|
||||
|
@@ -57,7 +57,6 @@ pub fn init(
|
||||
opts.internal_format,
|
||||
@intCast(width),
|
||||
@intCast(height),
|
||||
0,
|
||||
opts.format,
|
||||
.UnsignedByte,
|
||||
if (data) |d| @ptrCast(d.ptr) else null,
|
||||
|
Reference in New Issue
Block a user