!rBmyrWnyssyCORKYgR:matrix.org

Wayland with Godot

48 Members
10 Servers

Load older messages


SenderMessageTime
21 Mar 2019
@toger5:matrix.orgTimo K.

ddevault: i read through your pr. It looks good. Sadly i also dont know what the currently prefered opinion is. 3.1 release was far more important to most ppl than discussing the display abstraction.
have u looked at: https://github.com/godotengine/godot/pull/16744/files

It is using a different approach. instead of inheriting from os_generic_unix the os_unix class gets a implementation of the abstract class DisplayDriver. (Could be DisplayDriverWayland or DisplayDriverX11 or even DisplayDriverDummy to have a godot "server" version for running a gdscript interpreter, or a multiplayer server...) wmww and I ran into issues with that approach (i think) or we just decided the inheritance is the better way to go.

18:22:38
@wmww:matrix.orgsophieEither could work. I think the reason I leaned toward the inheratence approch was just because it didn't require all the boilerplate of another interface18:25:42
@toger5:matrix.orgTimo K.Yea might have been, that we just wanted to get it done sooner...18:28:56
@wmww:matrix.orgsophieAnd just reduce total code18:30:47
@ddevault:matrix.orgddevaultgod dammit, I knew this "freedesktop" crap was going to be a can of worms19:14:17
27 Mar 2019
@cosson:matrix.orgcosson joined the room.22:27:11
@toger5:matrix.orgTimo K. ddvault: what is ur state on the wayland backend? If u are starting after the 4.4 i would have time as well. I would be interested in implemting it, since it is an amazing learning experience.
So if u have other work to do, it would be cool if i could do it with ur guidance. If u need it quickly or if there are other readons u want to do it urself that is obviously fine. Just wanted to let u know. In case it's any help to u.
23:46:02
28 Mar 2019
@toger5:matrix.orgTimo K. ddevault: okay just saw the pr on github!! you are almost done! nice 13:33:21
@toger5:matrix.orgTimo K.
int OS_Wayland::get_screen_dpi(int p_screen) const {
	if (p_screen == -1) {			if (p_screen == -1) {
		p_screen = get_current_screen();				p_screen = get_current_screen();
	}			}
 	if (p_screen < 0 || p_screen >= outputs.size()) {		 	if (p_screen < 0 || p_screen >= outputs.size()) {
 		return 72;		 		return 72;
 	}		 	}
 	return outputs[p_screen]->scale * 72;		 	// 192 is the magic value at which the godot editor automatically scales
 	// itself up. 96 is 192/2.
 	return outputs[p_screen]->scale * 96;
 }		 }

I have a question about that function:
Is the concept of having access to the actual mm size of the deprecated in wayland? so you just get the desired scale factor which informs applications about the UI<->pixel relation?

How did you stop sway from just upscaling the rendered buffer (which resulted in a blurry editor)?

13:36:28
@ddevault:matrix.orgddevaultsorry for the delay, I have a hard time keeping up with matrix13:44:26
@ddevault:matrix.orgddevault<3 IRC13:44:28
@ddevault:matrix.orgddevaultcan you ask code review related questions on github instead?13:44:38
@ddevault:matrix.orgddevaultas for getting involved in the work, please do13:44:45
@toger5:matrix.orgTimo K.sure, I was asking that question here, since it is more a general question about the wayland protocal and not really related to the code you pushed.13:46:12
@ddevault:matrix.orgddevaultwell, the answer is yes13:46:34
@ddevault:matrix.orgddevaultmm size is deprecated13:46:40
@ddevault:matrix.orgddevaultas for fixing the upscaled buffer, the solution is to create a buffer twice as large and use wl_surface_set_scale(..., 2)13:47:03
@toger5:matrix.orgTimo K.
In reply to @ddevault:matrix.org
as for fixing the upscaled buffer, the solution is to create a buffer twice as large and use wl_surface_set_scale(..., 2)
okay got it. Checked your code a little more and it makes total sense now.
ty for your replies ;)
13:53:19
5 Apr 2019
@wmww:matrix.orgsophie Had a chat with hpvb/tmm/person-with-the-monkey-avitar earlier. It looks like they want to have a DisplayDriver class, completely different from the OS class, which has its own singlton and has an implementation for every platform (except Linux, where it has an X11 implementation and a Wayland one). This would allow selecting the OS implementation at build time, and the DisplayDriver implementation at runtime. Supporting multi window also somehow works into that plan. 03:34:21
@wmww:matrix.orgsophieThe plan sounds similar to what Toger and I were originally working on (https://github.com/wmww/godot/compare/c487cce6d0af608173508b10d4d3a37f8f0a9907...wmww:display-abstraction-2) (mostly because that was based off a fork from an unmerged PR hpvb made ages ago). I showed them that and it sounds like it might be useful.03:37:23
6 Apr 2019
@wmww:matrix.orgsophie toger5,ddevault: Rebased an old branch against current master. I think this is the approch hpvb wants to go with: https://github.com/godotengine/godot/pull/27747 23:02:19
7 Apr 2019
@costalfy:matrix.org@costalfy:matrix.org joined the room.13:15:56
8 Apr 2019
@ddevault:matrix.orgddevaultwmww: sorry I've been offline, I don't really use matrix for anything else14:07:52
@ddevault:matrix.orgddevaultwmww: how can I help with the DisplayDriver approach?14:07:59
@wmww:matrix.orgsophie ddevault: It's close to done. I plan to rename Freedesktop-> LinuxBSD due to the results of the pole and fix a few small things, but mostly I'm just waiting for the core contributors (and especially hpvb) to give such a massive PR some attention. 14:11:38
@ddevault:matrix.orgddevaultcool14:12:02
@ddevault:matrix.orgddevaultI can start building a wayland display driver based on this work if you'd like14:12:16
@ddevault:matrix.orgddevaultand pull in my work on the other branch14:12:20
@ddevault:matrix.orgddevaultI can also just wait a few days to see how it shakes out14:13:42
@ddevault:matrix.orgddevaultwhatever's most helpful to you14:13:44

Show newer messages


Back to Room ListRoom Version: