1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

gg: window_size_real_pixels that for 3D without dpi scaling (#9004)

This commit is contained in:
penguindark
2021-02-27 22:11:26 +01:00
committed by GitHub
parent 5807e1b3ae
commit 1d69a0bd22
6 changed files with 17 additions and 12 deletions

View File

@ -359,7 +359,7 @@ fn draw_cube_glsl(app App) {
rot := [f32(app.mouse_y), f32(app.mouse_x)]
ws := gg.window_size()
ws := gg.window_size_real_pixels()
// ratio := f32(ws.width)/ws.height
dw := f32(ws.width / 2)
dh := f32(ws.height / 2)
@ -428,7 +428,7 @@ fn draw_texture_cubes(app App) {
}
fn frame(mut app App) {
ws := gg.window_size()
ws := gg.window_size_real_pixels()
ratio := f32(ws.width) / ws.height
dw := ws.width
dh := ws.height