mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00
opengl: for an array, size is just the size of the type
This commit is contained in:
@ -73,8 +73,8 @@ pub const Binding = struct {
|
|||||||
ptr: *const anyopaque,
|
ptr: *const anyopaque,
|
||||||
} {
|
} {
|
||||||
return switch (@typeInfo(@TypeOf(data))) {
|
return switch (@typeInfo(@TypeOf(data))) {
|
||||||
.Array => |ary| .{
|
.Array => .{
|
||||||
.size = @sizeOf(ary.child) * ary.len,
|
.size = @sizeOf(@TypeOf(data)),
|
||||||
.ptr = &data,
|
.ptr = &data,
|
||||||
},
|
},
|
||||||
.Pointer => |ptr| switch (ptr.size) {
|
.Pointer => |ptr| switch (ptr.size) {
|
||||||
|
Reference in New Issue
Block a user