Skip to content

Commit

Permalink
quartz_core: correct MetalLayer.setOpacity, add `MetalDrawable.pres…
Browse files Browse the repository at this point in the history
…ent`
  • Loading branch information
foxnne committed Dec 6, 2024
1 parent 515a332 commit 8bb1225
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/quartz_core.zig
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ pub const MetalDrawable = opaque {
pub const release = InternalInfo.release;
pub const autorelease = InternalInfo.autorelease;

pub fn present(self_: *@This()) void {
return objc.msgSend(self_, "present", void, .{});
}

pub fn texture(self_: *@This()) *mtl.Texture {
return objc.msgSend(self_, "texture", *mtl.Texture, .{});
}
Expand Down Expand Up @@ -88,7 +92,7 @@ pub const MetalLayer = opaque {
return objc.msgSend(self_, "setOpaque:", void, .{opaque_});
}
pub fn setOpacity(self_: *@This(), opacity_: f32) void {
return objc.msgSend(self_, "setOpaque:", void, .{opacity_});
return objc.msgSend(self_, "setOpacity:", void, .{opacity_});
}
pub fn wantsExtendedDynamicRangeContent(self_: *@This()) bool {
return objc.msgSend(self_, "wantsExtendedDynamicRangeContent", bool, .{});
Expand Down

0 comments on commit 8bb1225

Please sign in to comment.