Friday, 2016-09-02

ColaEuphoriaExample 2?00:00
ColaEuphoriaIt should :/00:00
ColaEuphoriait should toggle the check00:00
drobillaodd00:01
ColaEuphoriaThe "window" should also subtlely light up when you mouse over it and be draggable within the master window when dragging the "title bar"00:02
drobillaShit, I broke something somehow00:03
*** NickLappy has quit IRC00:12
drobillaOkay, kind of works00:17
drobillaThe library seems generally designed to be refreshed at a high rate like a game or whatnot00:18
drobillaSo there are no mechanisms that request updates when something changes00:18
drobillaWhich is a bit shit for GUIs, but c'est la vie00:18
drobillaWhich is to say, as far as I can tell, nanogui = constantly rendering entire GUI at high rate00:18
drobillaBut it's a start, I suppose00:19
*** unclechu has quit IRC00:19
drobillaAha, there we go.  Highlight on hover, all widgets work, etc.  Nice.00:22
ColaEuphoria<drobilla> Which is to say, as far as I can tell, nanogui = constantly rendering entire GUI at high rate00:33
ColaEuphoriathat's how i felt when i looked at nuklear00:33
ColaEuphoriait was especially strange because all the ui elements lagged behind the mouse00:33
drobillaGL people have that habit00:33
drobillaTacking on a more refined update mechanism wouldn't be too hard00:34
drobillaAt the very least one that only draws the whole thing when *something* changes would be trivial00:34
drobillaColaEuphoria: So to use this in a plugin UI you'll have to use the idle callback feature.  Can find an example in some existing pugl UI or other00:41
ColaEuphoriaAlright00:49
drobillaColaEuphoria: https://github.com/drobilla/nanogui have fun02:32
drobillaColaEuphoria: It's far from perfect, and has a gap or two, but mostly works02:33
drobillaColaEuphoria: Let me know if you want push access02:33
drobillaAs for using from a plugin, everything is driven via Pugl events, so you should just be able to set it up, and drive things like every other LV2 Pugl UI02:34
drobilla(There is one static thing left I noticed, an icon cache, so if you use the icon stuff that needs fixing)02:34
ColaEuphoriaWow, thanks! I didn't expect you to actually go through with this and I'm pleasantly surprised!02:39
drobillaI was conservative, so the diff is relatively small02:39
drobillaMore crap could probably be stripped out but might as well keep the forkeyness down until there's a good reason to do otherwise02:40
ColaEuphoriaYou think a small letter to the ML about this would be useful?02:40
drobillaSeveral pugl updates were necessary, so you'll need the latest git02:40
ColaEuphoriayeah i saw the pugl updates02:40
drobillaColaEuphoria: Probably better after actually getting a UI to work with it at least02:40
drobillaBob knows you're not the first to struggle with the "WTF toolkit do I use?" question, so in general, letting people know would be good, yeah02:41
drobillay/w02:41
ColaEuphoriaI was actually in the process of tinkering with Qt and even got a dial working02:43
drobillaRe: earlier talk on examples, I think it'd be a good idea to make heavier examples that aren't particularly suitable for inclusion in LV2 itself as separate repos (probably on github), so this'd be a good candidate for that02:43
ColaEuphoriaI thought it was working out well, until I tried it out in Windows and had a gorillion extra runtime dlls it needed..02:43
drobillaQt's alright for apps if you don't find the crazy preprocessor thing too offensive, but dead in the water for plugins02:44
* drobilla likes the gtkmm API much better, but Gtk is brutal in its own ways02:44
drobillaIf I had all the time in the world I'd probably take this as a seed and mash it into something as close to gtkmm as possible and port my stuff02:44
drobillaMaybe some day :)02:44
ColaEuphoriaOne thing that kind of irks me is its reliance on Eigen02:49
ColaEuphoriaI'm not sure if it actually needs that02:49
ColaEuphoriaBut that's pretty much a non-issue at this point02:49
drobillaYeah, I noticed that too02:56
drobillaWhole library used basically for a 2D vector struct as far as I can tell02:56
ColaEuphoriaSomeone probably drank the NPM Kool-Aid on taking in dependencies willy nilly02:57
drobillaWell, let's see how it works02:58
drobillaI'm down to mercilessley fork this thing if it turns out all right02:58
drobillaI'm sure Eigen could be dropped in another evening02:59
drobillaGLAD already isn't used in this version02:59
ColaEuphoriaI do NOT see any use case for needing to do heavy matrix math in a fucking widgets toolkit and if there is, it should be done by the end developer03:00
ColaEuphoriaBut yeah I agree, I'd also be down to turning this into something more useful for plugin devs and shaping it for LV203:01
ColaEuphoriaBut not too coupled to LV2, like I would still like to use this and pugl for developing a VST as well if I ever feel like going back to that03:02
drobillaThe colorwheel and serialization stuff (which I'm not sure the use of) seems to be the only thing that really uses it03:02
drobillaSure, coupling in that way would be a terrible idea03:02
* drobilla is all about nice self-contained things03:03
ColaEuphoriaPugl could be an extremely useful tool for any kind of plugin developer03:03
ColaEuphoriaIt could free people from the JUCE hell03:03
drobillaYeah.  It's forked a bit, which is unfortunate, but the general idea of something with the scope of Pugl is great03:04
drobillaActually having a solid solution to the general problem of portable plugin UIs would win some people for sure03:05
ColaEuphoriaI wonder if Calf changed their UI, if the Renoise people would reconsider adding LV2 support :^)03:06
ColaEuphoriaBecause if I remember, their whole beef was the UI situation03:06
drobillaSure.  The current Gtk (and to a lesser extent Qt) thing is basically fundamentally incompatible with binary releases on the big proprietary platforms03:07
drobillaIt was expedient03:07
drobilla(Like so much of LV2...)03:07
drobillaHeh, Eigen is ~128KLOC03:08
drobillaWhy do I have a feeling this is why nanogui takes forever and a day to compile03:08
ColaEuphoriaugh03:08
ColaEuphoriaDelicate Synth uses matrices and actual matrix math03:09
ColaEuphoriayou know how I handled that?03:09
ColaEuphoriaa 2D array...03:09
ColaEuphoriaand a function for matrix multiplication03:09
ColaEuphoriaI wonder if I could take out the Eigen dependency myself03:10
ColaEuphoriaI'd have to see exactly what it's using it for03:10
ColaEuphoriaand what matrix operations it's doing03:10
drobillaAssuming this serialization stuff isn't actually needed, not much03:11
drobillaBunch of utilities that aren't used at all internally03:11
drobillaAlso shader stuff, which might be the tricky bit03:13
ColaEuphoriaShader code could be hardcoded in03:14
ColaEuphoriaActually, which part are you talking about? The nanogui level? or the nanovg level?03:14
drobillaWell, it has a wrapper which uses eigen stuff to set transformation matrix and whatnot03:15
drobillananogui03:15
drobilladoes nanovg use it too?03:15
ColaEuphoriaI'm not sure03:15
ColaEuphoriananovg has a nice premake script :)03:15
drobillaI don't think so, and grep agrees03:15
drobillaI get that shaders are how you do things these days, but I'm graphics dumb and don't particularly care to bother with it all03:16
drobillaThis is where the Cairo desire comes from.  Any idiot can understand that and you don't need to put code in strings :)03:17
ColaEuphoriashaders are usually compiled from the start03:17
ColaEuphoriaand in uis i don't think ever change03:17
ColaEuphoriaalso in uis the TF matrices are easier to deal with since it isn't doing any perspective projections or anything03:18
ColaEuphoriamainly just translation, if anything03:18
ColaEuphoria*maybe* rotation, if you want to get fancy03:18
ColaEuphoriascaling probably03:18
drobillaSure03:19
drobillaIt's not heroic but it's a bit of work03:19
drobillaWhich I can't do because the shader crap (e.g. ImageView) doesn't work for me in the first place :)03:19
ColaEuphoriawell03:19
ColaEuphoriaall the logical equations and whatnot are supposedly already there03:20
ColaEuphoriait's just that it's calling eigen to do the work03:20
ColaEuphoriaoops03:23
ColaEuphoriai forgot to reinstall the new pugl before make-ing03:23
ColaEuphoriaI wonder if one could add pugl to be downloaded with the git --recurse03:24
ColaEuphoriaand store it in ./ext03:24
ColaEuphorialike it's doing with nanovg already03:24
*** falktx` has quit IRC03:38
drobillaYou could03:47
drobillaI didn't want to bother figuring out how to make cmake build it03:47
ColaEuphoriaunderstandable :)03:47
ColaEuphoriadrobilla, I see so much potential here04:35
ColaEuphoriahttp://pastebin.com/8gbgZkZj04:35
ColaEuphoriaDoes "NanoPugl" sound like a good name?04:36
*** falktx|work has joined #lv207:13
*** falktx|work is now known as falktx07:13
*** sigma6 has joined #lv207:16
*** deva has joined #lv207:24
*** falktx` has joined #lv207:35
*** falktx is now known as falktx|work07:36
*** oofus_lt has joined #lv207:53
*** ricardocrudo has joined #lv208:19
rgareusdrobilla: what's the "PU" in pugl?  portable u*?    PlUgin ?08:24
*** trebmuh has joined #lv208:25
ColaEuphoriargareus, you should know by now the arbitrary nature in which drobilla names his projects :)08:26
ColaEuphoriaPossibly "portable/universal gl" is what I'm getting out of it08:27
rgareusColaEuphoria: I suppose08:28
rgareusthen again:  jalv (jack lv2)   lilv (lib lv2) ,  ingen (pun on engine)  are not really acronyms, so who knows.08:32
rgareuswell, maybe.. one can use multiple letters of one word, depending on whom you ask :)08:33
*** sigma6 has quit IRC09:31
*** edogawa has joined #lv209:46
*** dsheeler has quit IRC10:15
*** dsheeler has joined #lv210:25
*** falktx` has quit IRC11:07
*** deva has quit IRC11:07
*** falktx` has joined #lv211:09
*** deva has joined #lv211:09
*** rgareus is now known as rgareus|afk11:49
*** sigma6 has joined #lv213:04
*** sigma6 has left #lv214:20
drobillaIt's kinda sorta PlUgin GL14:53
*** oofus_lt has quit IRC14:54
drobillaThey are usually kind of portmanteaus, selecting 4 letters in order to make a uniqueish pronounceable word.  JAck LV2, LIghtweight LV2, SErialize RDf, StOre RDf, SeRialize ATOM, etc14:56
drobillaPugl has gotten a bit stale since you can use it without GL at all, I suppose14:56
drobillaBecause most of my libraries are C (no namespacing), long names are irritating14:58
*** rgareus|afk is now known as rgareus14:58
rgareusdrobilla: personally I think adding optional cairo is a step backwards -- first step towards feature bloat, kitchen sinkyness14:59
drobillaI know you do14:59
drobillaBecause you already added that mess to your own code so you don't care14:59
drobillaThe entire point of the library is to avoid irritating mess in user code15:00
drobillaSo you are wrong :P15:00
rgareusI'd have preferred a a thin example wrapper around pugl.15:01
rgareusbut whatever15:01
drobillaGL is often troublesome.  Not having to deal with it whatsoever if you just want to write a UI in Cairo is nice15:03
rgareusthat I agree with15:04
drobillaI care about niceness of user code over hand-wavey notions of "bloat", assuming the latter isn't too onerous15:04
drobillaI would like to factor it out more, but that would be more bloatey, really15:07
*** dsheeler has quit IRC15:08
drobillaAnyway, it's not a slippery slope to anything.  Anything outside the mandate of "minimal access to events and a drawing context" is very definitely never going in, and IMO there's exactly two reasonable choices of "drawing context"15:14
drobillaThough the nanogui port has me wondering if time counts (missing thing that glwf provides)15:15
drobillaThe main loop currently has a whole thread whose only purpose is calling puglPostRedisplay, which is kind of silly15:15
drobillapuglWaitForEvent having a timeout + a way to get elapsed time would eliminate that15:16
drobillaThe former seems good, the latter perhaps kitchen sinkeyness15:17
rgareusdrobilla: event-loop thread? does not sound like that's portable. (at least on OSX all things GUI must be in Thread 1, so it'll have to be idle-callback)15:18
rgareusa dedicated 2nd event loop with X11 isn't exactly robust, either.15:18
drobillargareus: Yeah, there's a hilarious rant in the nanogui code about dealing with this in OSX by swapping contexts with the main thread or some such, but doesn't seem to be true anymore15:20
rgareusand on windows you'll have endless fun with concurrency issues: GL context with a multiple plugin GUIs.     thread X  calls wglMakeCurrent()  is preemted  thread Y  calls wglMakeCurrent () ...15:20
rgareusit's fine if it's separate processes, but not  one process with threads (plugin GUIs)15:21
drobillaI thoroughly agree in general that threads in UI drawing/event anything is an extremely terrible idea 99.999999% of the time15:21
rgareusidle callbacks are fine.  the host serializes it15:21
drobillaIn this case puglPostRedisplay just sets a flag so it doesn't matter15:22
drobillaBut wait for events with a timeout really seems like a thing that should exist15:22
rgareusyeah animations kind suck,  and the workarounds to make it possible in some plugin UIs are horrible.   Addictive Drums for example can block the entire event loop on OSX.15:24
rgareusStill,  idle-callbacks are fine for animations.15:24
rgareusjust have a timer set a flag (needsDisplay)  and the next Idle will do the expose15:25
rgareusa better option is to have v-blank trigger events (also usually main thread)15:26
drobillaSpeaking of bloat I kind of think the GLUT event callbacks are bloat now.  Different function prototypes for events are for toys and make dispatch mega annoying, events are just better.  It would remove a ton of boilerplate15:27
drobillargareus: Yeah, with the idle callback (where you can't block forever anyway) it's fine.  Only really a thing for apps with a main loop15:27
drobillaRe: name, I wouldn't bother changing it until/unless this evolves into its own thing.  It's still very close to nanogui15:52
*** dsheeler has joined #lv215:54
*** drobilla has quit IRC15:58
*** drobilla has joined #lv216:35
*** ssj71 has joined #lv216:42
*** unclechu has joined #lv216:54
*** ricardocrudo has quit IRC17:02
*** falktx|work has quit IRC17:06
*** unclechu_ has joined #lv217:08
*** unclechu has quit IRC17:11
*** NickSB2_ has quit IRC19:16
*** rncbc has joined #lv219:30
*** ssj71 has quit IRC20:12
*** deva has quit IRC20:32
*** drobilla has quit IRC21:08
*** dsheeler has quit IRC21:17
*** dsheeler has joined #lv223:34
*** edogawa has quit IRC23:47

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