Authentication-Results: mail-b.sr.ht; dkim=pass header.d=gmail.com header.i=@gmail.com Received: from mail-io1-f48.google.com (mail-io1-f48.google.com [209.85.166.48]) by mail-b.sr.ht (Postfix) with ESMTPS id 0F343FF0F8 for <~eliasnaur/gio@lists.sr.ht>; Mon, 18 Jan 2021 05:56:05 +0000 (UTC) Received: by mail-io1-f48.google.com with SMTP id x21so12471554iog.10 for <~eliasnaur/gio@lists.sr.ht>; Sun, 17 Jan 2021 21:56:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:cc; bh=7DK9InJWqKuCqFFRlwDiYDtmGBRekovvkvQb5zouBdc=; b=VuysotbgSV7L3lOh/0VdJxpDmGbCeMEyuc4TWu7HOaM7RKzYMT7IS0hHBfzj+n3G0R aV0Rw2kmbVb4aYjVxLHFBm0/PyvRhgKMBn7DuTJk38Qzq7ZxqnOkdm/npi/bkvTcWxZj 50d2izIDV+WkHRLPW3BGivYvnWMPvCgBqM7oadAOlu7+1BynN0Ee5q9zJYR5QWcMsg1w b8YU1oqsC51Oczq6+zsrF/QBbFg12LlXRTxt4/8myMXjjo8kXb8dlzL0WMjOPfwJfu6I LkB/jGYjsnCTzkJrrW9WUmiRtYDm/AqzICky1WJ6tG087fXRb13IURTNtj9hFGYhEppT NN1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:cc; bh=7DK9InJWqKuCqFFRlwDiYDtmGBRekovvkvQb5zouBdc=; b=B6RLRMRHjaLAaECLvYIHLyMJgqGOGovR8QBht3gB/b1bQEcOReVF7uWs1SyUB3YvxV /Ts+dq52Cmdiqu07tCgnh+83JDPFVaxTdr+YN4AtAXSqRtzzT+smvGD0vJBYsCweW4Rg l6oR35JE71BhNtNFDUMEm/bpAXEGiTrz5yXWWwxgIc6wov3hf0OeLV8xXU5A9z++cgAh nHgTZBQzwHYjvfto4hAwq/VYR5mQWMFzry0WIixlC/N8qlR7fRswa+9NbHCODzBOU9H1 GsKMT5CLtxxSMGaIJ/HJzH2KDAE/rdNseu8alYyw+AEeKvU4luFtLcnHZOiz/Kv7v8v6 lIUQ== X-Gm-Message-State: AOAM5306ybbN6/XP8iSDHHEDFy4lVx0KLoqxx6qWr7DbTB2qgIdv8ZXV 7GIsUxNTpYXyddMGxu0yRzMn5i1EJ8feH6LLE1uqe+17K0LuJQ== X-Google-Smtp-Source: ABdhPJzni04YLo/Iw4vXsGFI+Xur6xSEziG8R/yNQPKNy2IHqKZo2y8XeaXt1sNz/JJpEEtXg8i9J2UUDHm5aBfOU7o= X-Received: by 2002:a02:c043:: with SMTP id u3mr911333jam.137.1610949364065; Sun, 17 Jan 2021 21:56:04 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Zhao Wang Date: Sun, 17 Jan 2021 21:55:52 -0800 Message-ID: Subject: Re: Injecting custom frame update to the flow? Cc: ~eliasnaur/gio@lists.sr.ht Content-Type: text/plain; charset="UTF-8" Hi Loki, Thanks for the help. It is helpful, I will try the approaches you mentioned below. Besides my response below, here is our current app demo, just in case it helps to understand what I am talking about. https://drive.google.com/file/d/1HTJ5L8l4MoRz5llK_WhR7ObyKMtvJK6X/view The gif above shows both chat view (native iOS UIKit view) and game view (custom iOS UIView with a EAGLContext with DisplayLink) On Sun, Jan 17, 2021 at 12:50 AM Loki Verloren wrote: > > It should be possible to take the pixels the other code is generating and put them > in an image op and update the window, does the other GL library have a headless > functionality? I assume the game environment captures events of interest also to > the proposed Gio GUI you want to frame/overlay on it. Yeah, the other GL library we have is headless, it expect the native view/window to provide the context and pass input events to game. Game libraries will handle input events. > If you can avoid the two things drawing into the same box there might be some way to > make the box for the GL paint directly as it normally does and Gio just render nothing > in the same place. There might be synchronisation issues with this also, but it probably > would only make some screen garbage/flicker etc. idk. just thinking out loud. Yeah, I was thinking to use GIO's window and context to draw game stuff. Gio widget can be drawn at top of game drawings. See game demo above, in game view, the back button and menu button are native iOS UIKit buttons and the chat view are UIKit view, they are not draw by game libraries. > I have done a little work with headless rendering. I was initially going to go for a > more traditional offscreen private bitmap, using the headless context, to make a scrolling view, > but found I was able to skirt around doing so much blitting by running the widgets to > generate dimensions, as with dimensions computing how to render the view. That's how my scrollbar > widget works. > > It's the best scrollbar implementation to date for Gio, maybe looking at what I did will > give you some ideas? https://github.com/p9c/pod/blob/master/pkg/gui/list.go > > Sent with ProtonMail Secure Email. > This sounds great, if I can make game view as a widget, it might solve the problem well. I will definitely check this out and see if I can figure out this way.