Perl 6 - the future is here, just unevenly distributed

IRC log for #pogl, 2017-01-14

| Channels | #pogl index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
14:37 chm joined #pogl
15:42 Mithaldu chm: also, yeah, i am aware of shadertoy and did in fact open an issue there
15:43 Mithaldu otoh there's nothing he's done that i haven't done way before with plain OpenGL.pm :v
15:43 Mithaldu (or well, my bleeding fork)
16:29 chm Mithaldu: welcome back.  The point of app-shadertoy was that it was using modern opengl shaders
16:29 chm Mithaldu: OpenGL had only fixed pipeline core support with extensions for shaders
16:29 Mithaldu chm: https://dl.dropboxusercontent.com/u/10190786/your_perl_on_drugs.avi
16:30 Mithaldu 2013
16:30 Mithaldu literally the same technique he is using
16:30 Mithaldu my script even has the same name :v
16:31 Mithaldu the only difference now is that glew is inbetween, making it much more easy to compile and reliably call the functions in question
16:32 Mithaldu my point thus being: i'm happy about glew, but otherwise not particularly impressed, since i feel my efforts (identical otherwise) are being discounted
16:32 chm The downside of the initial OpenGL::Modern bindings is the typemap hack of pointers as strings
16:32 Mithaldu that said
16:32 Mithaldu i still don't know what your last github comment was supposed to mean, in regards to the two things i mentioned
16:33 chm Mithaldu: which comment?
16:33 Mithaldu see my response: https://github.com/devel-chm/OpenGL-Modern/issues/16#issuecomment-272628049
16:37 chm Mithaldu: The OpenGL module had some issues with implementation largely because of build-time configuration.
16:38 Mithaldu i know it's an ugly hack in he name of getting things moving quickly
16:38 Mithaldu 90% of that comment was "here let me tell you things you already know", to which my brain can only come up with utter confusion
16:38 Mithaldu so
16:38 Mithaldu 1. do you expect me to do something else there?
16:38 chm Using GLEW addressed that, and generating xs bindings from GLEW allows for support of all the GLEW supported features and a way keep uptodate automatically.
16:38 Mithaldu 2. do you know what you need to do about the matter?
16:39 Mithaldu oh you're talking about something else
16:39 Mithaldu :|
16:40 Mithaldu also, you just did it again
16:40 Mithaldu i just told you i know about glew and am happy about it
16:40 Mithaldu and you proceed to tell me what glew does
16:41 chm Where I was going was the part that GLEW doesn't do---the perl part of the bindings.
16:41 Mithaldu yes, i know that
16:42 chm All pointers as strings is a big hack and not to be expected from perl users wanting to do OpenGL graphics.
16:42 chm Fixing the bindings generation to correctly handle the datatypes is the next step.
16:43 Mithaldu so what does that mean in regards to xs_buffer?
16:43 chm The second paragraph was just stating that now that I've extracted OpenGL::Modern from app-shadertoy, the remaining development for OpenGL API is here.
16:43 chm Not at app-shadertoy which is just a user of OpenGL in principle.
16:43 Mithaldu again something i knew, as should be obvious from where i'm directing my issues and PRs
16:44 Mithaldu it's mildly insulting that you seem to think i needed to be told that
16:44 Mithaldu i am not particularly happy at the moment
16:44 chm It wasn't clear since the same issue was opened for both repos.  I just wanted to confirm the one I was working from going forward.
16:45 Mithaldu i opened it for him because he is still using xs_buffer: https://github.com/Corion/app-shadertoy/blob/master/lib/OpenGL/Shader/OpenGL4.pm
16:45 Mithaldu and as such should at least be made aware that he is using something broken
16:46 chm I apologize for confusing but "I have absolutely no idea what that response means" sounds like you don't understand and now you seem insulted that I'm saying things you already know.
16:47 Mithaldu your comment on github consisted to 90% of things i already knew, and some things very obviously so by my actions
16:47 Mithaldu thus the meaning of why you posted all of that in the first place was very unclear as i did not expect you to think i actually was ignorant about all these things
16:47 Mithaldu plus
16:48 Mithaldu you still haven't said what you intend to actually do about the brokenness
16:49 Mithaldu which in terms of importance, honestly ranks way above "chm thinks i don't know anything"
16:49 chm I guess I was interpreting the focus on xs_buffer and fixing it as indicating that OpenGL:Modern::Helpers was being taken as the plan for the implementation.
16:49 Mithaldu ok, that i can understand
16:49 Mithaldu and no, i'm aware things are gonna change
16:49 Mithaldu but you've made no explanation as to how
16:50 Mithaldu and while it's still there, i'd prefer to either see xs_buffer's wrong usage removed entirely in both projects, or the XS adjust as per zefram's comments
16:50 chm Maybe the statements were a bit oblique and repetitive because I did not want to put down Max's first bindings work with GLEW which was a huge help to me getting moving with things.
16:51 chm The fix is to have the typemaps for the functions to correspond to the actual types at the C level.
16:51 chm For example, a pointer to an array of ints would be a pointer to array of ints.
16:51 Mithaldu so xs_buffer becomes unnecessary?
16:52 chm xs_buffer is a hack showing how to get the current all-pointers-are-strings to work.
16:52 chm Once the typemaps are fixed, things will be a lot more direct as with OpenGL.
16:53 chm The catch is that there are a fair number of special cases that need to be implemented and hundreds of routines to include.
16:53 Mithaldu that's my whole point
16:53 Mithaldu the typemaps thing sounds like a very long task
16:54 chm I did review all the OpenGL routines in the GLEW includes---basically all core and extensions--for problematic typemaps.
16:54 chm There are about 2800 routines in total.
16:54 Mithaldu leaving xs_buffer around as it is in its "depending on your perl version blows up at you" form until the typemaps are done, would be a very "let the perfect be the enemy of the good" solution
16:55 chm About half of those don't have pointers so the bindings are essentially "done" and "correct"
16:55 chm Of the other half, I think there were about 400 in the core API
16:55 Mithaldu aye
16:56 Mithaldu and a bunch of them also use pointers to fields of varying lengths
16:56 chm I thought focusing there made sense since much of the stuff that used to be EXT or ARB or XXX have not moved into core.
16:56 Mithaldu with some doing that xplicitly, and some implicitly
16:56 chm Of those 400, I was planning to start with the much smaller number or routines actually used by you, pdl, app-shadertoy.
16:57 chm It worked out to maybe 100-ish but then I ran out of time, you dropped off of the radar, Max was on travel...
16:57 chm Hence the lack of progress.
16:58 Mithaldu might be good if you documented how you were going to proceed
16:58 Mithaldu since, it sounds like mainly "menial" work
16:58 chm I've been meaning to update the wiki/issues with what I've worked out to proceed and will aim to do that this weekend.
16:58 Mithaldu which anyone could do as long as they were told how
16:59 chm It is also work that would be helped by actual users of OpenGL shaders and their APIs.
16:59 chm I have a "reading the red book" acquantance but no real programming yet.
17:00 Mithaldu i've shown you microidium, haven't i?
17:00 chm Partly that is due to my lack of interest in hacking around everything is T_PV so I can spend the time makeing the bindings work as expected by users.
17:01 chm Yes, and I appreciate you adding the list of needed routines to the issues for OpenGL::Modern
17:01 Mithaldu well i ask especially because you say "actual users of shaders"
17:01 Mithaldu here, hi
17:02 Mithaldu it is me, an actual user of actual shaders
17:02 chm There are other issues for OpenGL::Modern like getting it buildable for Mac OS X that need to be done
17:02 Mithaldu i use pixel shaders, vertex shaders and even geometry shaders to render text, sprites and even a glow post processing step
17:02 chm Yes, that is what I meant---you as a live OpenGL shader programmer. :-)
17:03 Mithaldu ah, so you didn't mean "would be helped", but "is helped"? ;)
17:04 chm I was hoping we might get other helpers too---2800 routines is a lot and the perlish implementation will need guidance as well.
17:04 Mithaldu and mac, i could set up a vm again at some point
17:04 Mithaldu not sure how much that helps with opengl 1.0 tho
17:04 chm For example, some concerns you had about potential performance issues from a previous #pogl discussion
17:04 Mithaldu right, you have CandyAngel too, and maybe sivoais and McFist_ could be roped in
17:05 Mithaldu depends mainly on documentation we can follow to do the needful
17:05 Mithaldu right, more concrete performance examples
17:05 chm Mithaldu: What do you mean OpenGL 1.0?  I don't think anyone uses that anymore...do they?
17:06 Mithaldu the apple vm i can set up does not provide full fall-through to my hardware
17:06 Mithaldu it emulates a bare minimum graphics card
17:06 chm At any rate, OpenGL 1.0 is in the GLEW bindings so OpenGL::Modern will support that if you use a back compatible context.  Getting harder to find however....
17:07 Mithaldu re performance
17:07 CandyAngel There is something I can help with?
17:07 Mithaldu https://github.com/wchristian/OpenGL-Modern/blob/dev/lib/OpenGL/Modern/Helpers.pm#L304-L310
17:07 Mithaldu https://github.com/wchristian/OpenGL-Modern/blob/dev/lib/OpenGL/Modern/Helpers.pm#L312-L314
17:07 Mithaldu these are functions i wrote to keep the api as i use it in microidium unchanged
17:08 Mithaldu they are called at least once per frame
17:08 Mithaldu and i'm pretty sure they're slower due to being in perl than if they were implemented that way in XS
17:09 Mithaldu CandyAngel: chm has been talking about a task that requires writing typemaps, one for each function that needs special handling, there's a few hundred of them. i think if he can document how to do that we could help with the heavy lifting
17:09 CandyAngel Definitely
17:09 Mithaldu chm: well, it would only possibly be helpful for testing compilation on mac if you can't find anyone else to help with that
17:10 CandyAngel I don't mind spending time doing boring-but-needs-to-be-done work
17:10 CandyAngel And that sounds like it might help me understand things for my OpenHMD bindings too!
17:11 chm Mithaldu: I think it would be cleaner if you had the micoridium wrappers in microidium and not OpenGL::Modern::Helpers.
17:12 chm That will keep it clear what is actually working in OpenGL::Modern.
17:12 Mithaldu chm: eventually i wanna get rid of 'em entirely
17:12 Mithaldu right now they're only there so you know what works
17:12 Mithaldu once i have better functions to call i'll remove the branch :)
17:13 Mithaldu CandyAngel: that's what i thought :D
17:13 chm If stuff is put in Helpers.pm, then it will seem to be there but the ultimate goal is that Helpers is in OpenGL::Modern.  Everything should work Helpers.pm deleted.
17:13 Mithaldu chm: in other words
17:13 Mithaldu the functions are in there
17:13 Mithaldu because i want OpenGL::Modern to give me those functions
17:14 Mithaldu if and when it does, they'll go away
17:14 Mithaldu that's about it :)
17:15 chm Mithaldu: I'm saying to please use Helpers.pm as documentation of how OpenGL::Modern is to be used and not for implementation.
17:15 chm If you want to track microidium requirements, I suggest addding Helpers/Microidium.pm
17:16 chm As the OpenGL::Modern API is not stable, I'm reserving the right to break things in Helpers.pm.
17:16 Mithaldu i don't consider these microidium-specific requirements
17:16 chm If you have your own Helpers/Microidium.pm that would avoid confusion.
17:16 Mithaldu since the functions i am using are basically just the most common ways to use them
17:17 Mithaldu anyhow
17:17 Mithaldu it's a dev branch
17:17 Mithaldu not master
17:17 Mithaldu that's why it's in my own repo and not the main repo
17:17 chm Mithaldu: I'm saying that putting them in Helpers.pm won't work since Helpers.pm is derived from the current OpenGL::Modern implementation.
17:17 Mithaldu what does "won't work" mean in this context?
17:18 chm It *will* change when the bindings change and I'm not tracking unimplemented features going the other way.
17:18 Mithaldu that's fine
17:18 Mithaldu it's in a dev branch
17:18 Mithaldu please understand what this means and what the implications are
17:19 Mithaldu it being in a dev branch implicitly accepts that it is ephemeral and temporary
17:19 chm perldoc OpenGL::Modern::Helpers begins with: OpenGL::Modern::Helpers - example usage of raw pointers from perl and This API is an experiment and will change!
17:19 Mithaldu and i don't expect you to track any of my dev branches
17:19 Mithaldu they're my responsibility
17:19 Mithaldu once you change master i'll move them around and track your work
17:20 Mithaldu i only told you about them to give you guidance
17:20 Mithaldu note that for stuff i actually DO want you to put in master, i gave you PRs: https://github.com/devel-chm/OpenGL-Modern/pulls
17:21 chm I understand.  However, since you're using your branch version of Helpers.pm for what I consider real things for OpenGL::Modern it is confusing to me.
17:22 chm Especially since Helpers.pm is intended to be development glue/grease while OpenGL::Modern is fleshed out.
17:23 Mithaldu to the latter, yes, i temporarily created the glue i need
17:23 Mithaldu with the expectation of you creating things in OpenGL::Modern in the future to make the glue obsolete
17:23 Mithaldu they're ONLY there as suggestions for you
17:24 Mithaldu you can either implement them in XS or make counter-suggestions
17:24 chm Ok.  Well, I have to go to lunch.  I'll plan for some updates and plans from this discussion.  Thanks CandyAngel and Mithaldu for everything.  More soon!
17:24 chm o/
17:24 Mithaldu cheers, looking forward to stuff
17:24 Mithaldu and please, just focus on advancing master :)
17:26 * CandyAngel nods
17:38 CandyAngel I'm about to start writing a visualiser for my P5 Glove driver development using POGL :P
17:38 CandyAngel These things, they are all inter-related!
18:24 Mithaldu p5 glove?

| Channels | #pogl index | Today | | Search | Google Search | Plain-Text | summary