Show FPS
This commit is contained in:
parent
fb9968c19f
commit
74cd3f5127
|
@ -10,7 +10,7 @@ const max_objects: usize = 16384;
|
||||||
const quadSize: usize = 9 * 6;
|
const quadSize: usize = 9 * 6;
|
||||||
|
|
||||||
pub fn init() !Self {
|
pub fn init() !Self {
|
||||||
rl.initWindow(1280, 720, "USG", 60);
|
rl.initWindow(1280, 720, "USG", 120);
|
||||||
|
|
||||||
var renderer = Self{};
|
var renderer = Self{};
|
||||||
|
|
||||||
|
@ -24,6 +24,8 @@ pub fn render(self: *Self) void {
|
||||||
rl.beginDrawing();
|
rl.beginDrawing();
|
||||||
|
|
||||||
rl.clearBackground(.{ 232, 216, 166, 255 });
|
rl.clearBackground(.{ 232, 216, 166, 255 });
|
||||||
|
rl.drawFPS(10, 10);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn deinit(self: *Self) void {
|
pub fn deinit(self: *Self) void {
|
||||||
|
|
|
@ -77,3 +77,7 @@ pub fn getScreenHeight() i32 {
|
||||||
pub fn getTime() f64 {
|
pub fn getTime() f64 {
|
||||||
return c.GetTime();
|
return c.GetTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn drawFPS(x: i32, y: i32) void {
|
||||||
|
c.DrawFPS(x, y);
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue