Add window.gldrawablesize

This commit is contained in:
Sijmen 2020-05-22 22:41:00 +02:00
parent b46b744d71
commit 1a8319b9c0
Signed by: vijfhoek
GPG Key ID: DAF7821E067D9C48
1 changed files with 7 additions and 0 deletions

View File

@ -86,6 +86,13 @@ pub const Window = struct {
};
return Renderer{ .renderer = renderer };
}
pub fn glDrawableSize(self: Window) struct { w: i32, h: i32 } {
var width: c_int = 0;
var height: c_int = 0;
c.SDL_GL_GetDrawableSize(self.window, &width, &height);
return .{ .w = width, .h = height };
}
};
pub const RendererFlags = struct {