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:
@ -372,7 +372,7 @@ fn draw_cube_glsl_m(app App) {
|
||||
return
|
||||
}
|
||||
|
||||
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)
|
||||
@ -415,7 +415,7 @@ fn draw_cube_glsl_p(app App) {
|
||||
return
|
||||
}
|
||||
|
||||
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)
|
||||
@ -458,7 +458,7 @@ fn draw_start_glsl(app App) {
|
||||
return
|
||||
}
|
||||
|
||||
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)
|
||||
@ -472,7 +472,7 @@ fn draw_end_glsl(app App) {
|
||||
}
|
||||
|
||||
fn frame(mut app App) {
|
||||
ws := gg.window_size()
|
||||
ws := gg.window_size_real_pixels()
|
||||
|
||||
// clear
|
||||
mut color_action := C.sg_color_attachment_action{
|
||||
|
Reference in New Issue
Block a user