Sunday, 2016-12-04

*** edogawa has quit IRC00:04
*** rncbc has quit IRC00:45
*** damo22 has joined #lv201:09
damo22hi, where is the code for LV2 that specifies how the UIs are integrated01:10
damo22eg, is there a function pointer for a window generator callback01:10
damo22or how do the UIs get called01:11
*** trebmuh has quit IRC01:45
*** Yruama_Lairba has quit IRC02:31
ColaEuphoria_damo22, are you talking about this? http://lv2plug.in/book/#_simple_oscilloscope02:47
drobillahttp://lv2plug.in/ns/extensions/ui/ ...03:25
drobillaFirst link in particular03:25
*** funfunctor has joined #lv203:26
funfunctorhi03:26
funfunctordamo22:03:27
damo22gday03:27
funfunctor && drobilla03:27
damo22drobilla: i was wondering why LV2 has different UI designations like CocoaUI etc and GtkUI, why not have them abstracted away so you can have a plugin launch the window it prefers and callback into the host?03:29
*** funfunctor1 has joined #lv203:30
*** funfunctor has quit IRC03:30
damo22as an example, me and funfunctor have ported GLFW to the DPF toolkit and removed the need for pugl altogether03:30
damo22but we're missing one crucial piece of the puzzle for embedding windows03:30
funfunctor1technically ported DPF to glfw03:32
damo22yeah sorry thats what i meant03:32
*** funfunctor1 is now known as funfunctor03:32
funfunctordrobilla: the issue is that parentId gets passed in to the constructor (intptr_tr) and is considered a X11 specific handle. glfw has a decent abstraction, GLFWwindow * and so we would need to pass that in instead03:34
funfunctorI'm not familiar with the architecture of things. I usually work on mesa and stuff so I am just helping damo22 out03:35
drobilla"missing one crucial piece of the puzzle"03:36
funfunctordamo22: has drobilla already seen the repo?03:36
drobillaIn removing that "need" you also removed functionality03:36
drobillaBeing the main point of pugl03:36
funfunctordrobilla: well no, glfw can do what pugl does except far better03:37
drobillaWhich is specifically designed to be suitable for plugins, and embeddable, and whatnot, unlike GLFW, which isn't03:37
funfunctorits just the API's don't match 1:1 perfectly obviously03:37
funfunctorI understand pugl and glfw perfectly well. glfw is definitely fine as a replacement, that is for sure.03:38
drobillaThen you shouldn't have a problem using the provided parent window.03:38
funfunctorour question is more to do with fixing things up without too much perturbation to the overall design of the high level components, not if it can be done.03:39
funfunctorwell the parent window seems to be a X11 low level handle to me03:39
funfunctorso you have a high level component passing a low level handle ?down?03:39
drobillaYes.  On X11, anyway (obviously). What else could it be?03:39
funfunctormakes no sense03:39
funfunctora high level opaque handle handle03:40
drobillaIt is the only thing that makes sense.  On X11, that is what a window is.03:40
drobillaYou can't have a high levle opaque handle03:40
funfunctorand what about wayland03:40
drobillaThat's API specific.03:40
drobillaOn Wayland it would be something else.  As it is on Windows03:40
drobillaand OSX03:40
funfunctorwhy should the plugin framework be API specific to the windowing system03:40
funfunctorisn't the point is for it to abstract away windowing system specifics03:41
drobillaBecause it can't be anything else.03:41
drobillaWhat else could any toolkit use?03:41
drobillaThe native window type is the only common thing any API can use.03:41
funfunctorI am not talking about the toolkit03:41
drobillaAbstracting that away is the job of said API03:41
funfunctorI am talking about what is passed into the toolkit from above it03:42
drobillaIf GLFW can't then it's hardly "far better" for this purpose03:42
drobillaYes, and you want it to be... "a high level opaque handle".  To what?03:42
drobillaHow does the UI use this opaque handle to do anything?03:42
funfunctorI think the question we have hasn't been conveyed properly because this isn't the discussion we require to progress.03:43
drobillaThe API is designed so UIs can be embeddable03:44
funfunctorI can see that03:44
drobillaThere is exactly one thing that can serve this purpose and be used by any graphics API, and that is the native window handle, whatever that might be on the given platform.03:44
drobillaThus the UI gets passed that and must draw to it.03:44
drobillaIf you can't do that because your API sucks, you can use show/hide interface instead and lose embeddability.03:45
drobillaand regress DPF in the process of your "upgrade" ;)03:45
*** unclechu has quit IRC03:45
*** funfunctor1 has joined #lv203:46
funfunctor1sorry, is there a backlog?03:46
damo22i'll paste it to you funfunctor03:47
funfunctor1thx03:47
drobillatopic.03:47
drobillaI can't tell what you want.  Clearly the host can not pass a GLFWwindow*03:47
*** funfunctor has quit IRC03:49
*** funfunctor1 is now known as funfunctor03:49
drobillaAs far as I can tell GLFW just can't embed.03:49
funfunctordrobilla: it depends what you mean by embedded03:50
drobillaI imagine it probably has a shitload of static stuff all over the place too, though that's just an assumption based on the things GL people tend to do.03:50
drobillaMisguided port IMO03:50
damo22drobilla: isnt it also true that on some platforms, you cant draw native GL onto the parent window that you desire?03:50
funfunctordrobilla: the GL btw is garbage also in that library. Its using fixed pipeline stuff that needs replacing.03:50
funfunctorIf you are saying porting from pugl to glfw is misguide I would peg to differ03:51
drobilladamo22: Not really.  Drawing is always to a window.  That's what a window system is.03:51
drobillafunfunctor: Yet here you are ;)03:51
funfunctordrobilla: actually no, GL draws go to a GL context not to a window03:52
drobillaYKWIM.03:52
funfunctordrobilla: I am here to communicate with developers not to argue silly points about not taking the time to understand why something is being done and being told its misguided03:52
* drobilla shrugs03:53
drobillaThe thing you ported to seems unable to accomplish the task03:53
funfunctordrobilla: I may guess what you mean by damo22 may not.03:53
drobillaI'm sorry if you're a fanboy of it, but that's the reality of the situation.  The actual, user-visible regression reality.03:53
damo22drobilla: wouldnt it be nice if suil was not necessary?03:54
drobillaAdd proper native window parenting to GLFW if you like03:54
funfunctordrobilla: that is ridiculous, let me rephrase that for you "the thing you are developing right now seems not to be finished"03:54
funfunctorah damo22 I am wasting my time..03:55
funfunctornow I am a fanboy03:55
damo22idk03:55
funfunctorfrom someone who can't write GL code to someone who writes GL drivers03:55
funfunctorright oh03:55
funfunctorsee you03:55
*** funfunctor has left #lv203:55
drobillaYou reap what you sow03:55
ColaEuphoria_i'm a bit too drunk right now what just happened03:56
drobillaI'm sorry that the host can't pass magic pixie fairie dust handles that don't even make sense, I guess?03:58
ColaEuphoria_ayyy gurl can i get an SDL_Window* handle from the host too :DD04:02
damo22what type of handle does the host export currently?04:03
damo22it seems to be display manager/platform specific?04:04
ColaEuphoria_It depends on what the host supports04:04
ColaEuphoria_If I'm writing a host, I'd rather just support simply X11 than to try and cater to everyone and add support for gtk/qt/glfw/sdl/etc04:05
ColaEuphoria_likewise with Windows where hosts only support HWND or something04:05
damo22X11 is broken04:05
damo22wayland is coming04:05
ColaEuphoria_(tm)04:06
ColaEuphoria_the point is that there is less onus on the host if all they have to do is support the lowest level native window handle04:06
ColaEuphoria_on windows i believe that is HWND04:06
ColaEuphoria_linux as of now is X04:07
damo22if the host is suil then you could have a callback you pass, and native embed using that callback becuase the GL draws dont go to a window they go to a GL context04:07
damo22you could handle *any* native window handle inside suil based on the platform youre on04:09
damo22GLFW is just an example of how to do this04:10
drobilladamo22: The Gtk/Qt parts, sure.  Which is exactly why talking in native window handles is the way forward04:13
ColaEuphoria_damo22, Are you asking why hosts don't just care about the renderer and find its own way to make a window for it?04:13
drobillaI don't understand what that's trying to say.  "A callback you pass and native embed using that callback"?04:14
drobillaTo embed is to embed in a window, in practice04:14
drobillaLet me put it this way04:14
drobillaHaving a (in this case) X window to draw in is not some design decision04:14
drobillaIt's reality04:14
*** unclechu has joined #lv204:15
drobillaThe choice is either to pass that native handle to the UI, or try to move some abstraction up into the host and pass <some other thing>04:15
drobillaThe former means you can draw with anything that supports, well, drawing on the platform04:15
drobillaThe latter means... well, I'm not sure what it means.  Either it can give you that same native window handle, or it does nothing useful at all04:16
*** hybrid has quit IRC04:17
drobillaIf you have a graphics API that literally can not embed, period, there is no change to the LV2 UI interface that can change that04:17
damo22drobilla: but if the LV2 api had a way for the plugin to set a callback for dispatching GL rendering commands instead of being passed a native window handle, you could have the UI just draw to the parent window via that04:17
ColaEuphoria_Then you're neglecting DirectX/Vulkan04:18
drobillaOne that can is, essentially by definition, happy with a native window handle, since that's what embedding is.  See e.g. EGL which has native window pointers as well.04:18
drobilladamo22: Then you need to bake in an entire window API into the LV2 UI extension, to get the size and all the rest of it04:19
drobilladamo22: But hey, maybe.  But if the host can do that, then so can the UI.  At the end of the day the same thing needs to happen: you have an X window, you need to draw GL to it04:21
drobillaAdding a whole new UI interface for this just adds stability burden and gains nothing04:21
drobillaRequires all the hosts to implement it, yadda yadda, for no gain04:21
* ColaEuphoria_ gets some tipsy motivation to work on nanogui/pugl04:21
*** hybrid has joined #lv204:22
drobilla(Also I'm not sure WTF GL code they were talking about.  Pugl doesn't draw anything...)04:22
damo22maybe it was DPF stuff04:22
drobillaMaybe.  or the cube test program, which is indeed awful (but irrelevant)04:23
drobillaA callback seems like a nice idea, but then all the hosts need to implement all the set up a GL context stuff04:24
drobillaFor all platforms04:24
drobillaAll of which already exists in portability libraries (like pugl and GLFW)04:24
drobillaand the native handle works just as well for non-GL things.  It's universal.04:24
drobillaReally GLFW just needs fixing.04:24
ColaEuphoria_Aren't native window handles also more stable than trying to cover rendering?04:24
ColaEuphoria_Even when trying to get an OpenGL context there's a ton of options you have in terms of version#04:25
drobilla(Though I am not sure if it is plugin appropriate anyway, need to audit it for static crap)04:26
drobillaColaEuphoria_: True.  We lack configuration stuff entirely ATM, but most of it you can do later with GL calls themselves04:27
drobillaOf course, rendering is the easy part04:27
drobillaEvents not so much.  You need that window handle to get events and have any user interaction whatsoever04:28
drobillaSo now to avoid that, we bake in an entire event API into the LV2 UI API04:28
drobillaaaaaaaaaaaand we've turned a single pointer to the reasonable thing into the bulk of a toolkit :)04:28
ColaEuphoria_>An audio plug-in, in computer software, is a plug-in that can add or enhance audio-related functionality in a computer program. Such functionality may include digital signal processing or sound synthesis.04:40
ColaEuphoria_:^)04:40
drobillaAnyway, talk is cheap.  I'd be more than happy to be proven an asshole and for this *not* to be a misguided effort, by GLFW gaining the ability to embed.04:47
drobilla'till then I'll be over here with my couple-KLOC wrapper that actually does the job04:50
*** grejppi has quit IRC06:30
*** grejppi has joined #lv206:37
*** son0p has joined #lv208:25
*** son0p has quit IRC08:30
*** oofus_lt has joined #lv208:52
*** deva has joined #lv209:21
*** artfwo has quit IRC10:17
*** artfwo has joined #lv210:28
*** trebmuh has joined #lv210:29
*** edogawa has joined #lv210:47
*** ugjka is now known as UgJkA11:22
*** edogawa has quit IRC11:30
*** son0p has joined #lv211:32
*** oofus_lt has quit IRC11:49
*** oofus_lt has joined #lv211:52
*** son0p has quit IRC12:56
*** rncbc has joined #lv215:22
*** oofus_lt has quit IRC15:50
*** son0p has joined #lv215:53
*** oofus_lt has joined #lv216:00
* drobilla idly wonders what an LV2 package manager would look like16:01
rgareussince bundles are self-contained, basically just curl + unzip16:14
rgareusunless you do want to include source-packages16:16
drobillaWell, you'd need a protocol to at least check/get particular versions, and a way to find current installed plugins, etc16:17
drobillaoh, and platform16:17
drobillaProviding a service that anyone can upload binaries to that are downloaded and executed is clearly trouble, though16:18
rgareusFor mixbus plugin-update we use YYYYMMDD to describe bundles (a txt file, top-level of the custom LV2 search path) and uname.  individual plugins have a version-number lilv picks the latest16:22
rgareusand yes, no public upload16:22
drobillaI guess just a mechanism to specify repositories to use.  Maybe a default that includes known/trusted developers16:24
rgareusMOD is similar, no public upload16:24
rgareusyou could gpg sign plugins and build a trust chain.16:25
drobillaIt'd be pretty cool if everything could benefit from the same system16:25
drobillainstall_a_bunch_of_cool_plugins_for_free_please would make LV2 a much more lucrative thing/contender16:26
rgareuslike  "your session misses plugin X, want me to download & install?"16:26
drobillargareus: I suppose, if we want to get fancy and support mirroring and whatnot like distros, but a simple thing where a given plugin comes from a given repository and its inherently trusted would do16:27
*** rncbc has quit IRC16:40
*** rncbc has joined #lv216:41
*** Yruama_Lairba has joined #lv217:13
*** edogawa has joined #lv217:43
*** damo22 has quit IRC18:45
*** grejppi has quit IRC20:21
*** deva has quit IRC20:30
*** grejppi has joined #lv220:36
*** edogawa has quit IRC20:44
drobillaI am wondering if some extension to state needs adding so that the plugin can tell if this is a "save" or a "preset save"21:05
drobillaThis only makes sense for dynamic "plugins" like Ingen21:05
drobillaBut I'm not sure how to figure out what to do21:05
drobillaI guess something like "if this graph has been saved elsewhere, and that save still exists, save a preset for it"21:06
drobillaMaybe with a symlink in the shared files dir for archiveability etc21:06
*** edogawa has joined #lv221:09
drobillaAllowing edits elsewhere to break a save is trouble, though21:09
*** grejppi has quit IRC21:41
*** grejppi has joined #lv221:56
*** edogawa has quit IRC22:32
*** grejppi has quit IRC22:32
*** oofus_lt has quit IRC23:03
*** rncbc has quit IRC23:04
*** grejppi has joined #lv223:08
*** trebmuh has quit IRC23:19

Generated by irclog2html.py 2.13.0 by Marius Gedminas - find it at mg.pov.lt!