Perl 6 - the future is here, just unevenly distributed

IRC log for #openframeworks, 2013-11-05

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

All times shown according to UTC.

Time Nick Message
00:00 dantheman joined #openframeworks
00:03 dantheman left #openframeworks
00:51 admsyn joined #openframeworks
00:58 tgfrerer joined #openframeworks
01:53 vade joined #openframeworks
02:10 zarkone joined #openframeworks
02:18 Seich_ joined #openframeworks
03:03 Seich_ joined #openframeworks
03:29 Seich_ joined #openframeworks
04:07 _ilbot joined #openframeworks
04:07 Topic for #openframeworks is now Welcome to http://openframeworks.cc/ | logs at http://irclog.perlgeek.de/openframeworks/
04:24 zarkone joined #openframeworks
04:42 Seich_ joined #openframeworks
04:56 Seich_ joined #openframeworks
05:02 Seich_ joined #openframeworks
05:05 vade joined #openframeworks
05:28 Seich_ joined #openframeworks
05:33 brainmachine joined #openframeworks
05:38 Seich_ joined #openframeworks
06:13 Seich_ joined #openframeworks
06:24 brainmachine joined #openframeworks
06:24 brainmachine hello
06:27 LCID_Fire joined #openframeworks
07:00 LCID_Fire joined #openframeworks
07:07 zarkone joined #openframeworks
07:12 LCID_Fire joined #openframeworks
07:34 Seich_ joined #openframeworks
07:52 alpha_ joined #openframeworks
07:58 Seich_ joined #openframeworks
08:05 LCID_Fire joined #openframeworks
08:17 Seich_ joined #openframeworks
08:50 DrCode joined #openframeworks
09:00 LCID_Fire joined #openframeworks
09:23 Seich joined #openframeworks
09:23 Graff joined #openframeworks
09:27 LCID_Fire joined #openframeworks
09:44 Seich joined #openframeworks
09:50 DrCode joined #openframeworks
10:43 starPause joined #openframeworks
10:45 Seich joined #openframeworks
10:46 brainmachine joined #openframeworks
11:23 brainmachine joined #openframeworks
11:46 Seich joined #openframeworks
12:28 brainmachine joined #openframeworks
12:35 DrCode joined #openframeworks
12:41 DrCode joined #openframeworks
12:46 Seich joined #openframeworks
13:28 brainmachine joined #openframeworks
13:45 superFluid joined #openframeworks
13:47 Seich joined #openframeworks
13:49 Seich joined #openframeworks
13:55 petersaints joined #openframeworks
14:14 kikko_fr joined #openframeworks
14:17 kikko_fr joined #openframeworks
14:20 vade joined #openframeworks
14:29 brainmachine joined #openframeworks
14:50 Seich joined #openframeworks
14:52 vade joined #openframeworks
15:09 torlanco joined #openframeworks
15:12 superFluid joined #openframeworks
15:30 brainmachine joined #openframeworks
15:37 Seich joined #openframeworks
15:44 kikko_fr joined #openframeworks
15:44 admsyn joined #openframeworks
15:51 petersaints joined #openframeworks
15:53 Seich joined #openframeworks
15:54 petersaints joined #openframeworks
16:12 mst1228 joined #openframeworks
16:20 mst1228 there was this line I have used before in main.cpp to set the sample depth in previous versions
16:20 mst1228 or i think that's what it did, but sometimes helped graphics look a little better
16:20 mst1228 is that not applicable in 0.8?
16:20 admsyn what's the line?
16:21 admsyn but if you're just talking about antialiasing then I think there's a specific oF call that'll do it for you
16:21 mst1228 something like this
16:21 mst1228 window.setGlutDisplayString("rgba double samples>=8 depth");
16:21 admsyn yeah I think there's a function for that now
16:21 admsyn I'm not sure if it only applies to GLFW though
16:22 vade joined #openframeworks
16:24 Seich joined #openframeworks
16:30 brainmachine joined #openframeworks
16:31 admsyn mst1228: if you're doing an app created after 0.8.0, you'll be getting GLFW by default, so that GLUT-specific code won't do anything
16:32 torlanco joined #openframeworks
16:32 admsyn the GLFW window has a function exposed for setting the number of samples for AA (setNumSamples() )
16:32 admsyn IIRC you can change it on the fly
16:40 brainmachine joined #openframeworks
16:43 mst1228 hmm, how do i use that?
16:43 mst1228 also, what do you mean by after 0.8.0?
16:44 mst1228 i have the 0.8.0 source from the site
16:57 admsyn mst1228: if you created an app with the PG using 0.8.0 or later, you'll get GLFW windowing by default, whereas if you're using a project you created with a version before 0.8.0, it'll be using GLUT by default
16:57 admsyn you can tell by looking at your main.cpp, if you see references to GLUT then…it's GLUT :)
16:57 mst1228 ha, great. yeah it's 0.8.0, no GLUT references
16:58 admsyn ok you can use the GLFW function then, one sec I'll find out the syntax
16:58 mst1228 thanks a lot
16:59 mst1228_ joined #openframeworks
17:01 admsyn ((ofAppGLFWWindow *)ofGetWindowPtr())->setNumSamples(8);
17:01 admsyn you'll have to #include "ofAppGLFWWindow.h" in the file that uses that
17:02 admsyn I think there's actually a more sane way of calling that, but that'll work :)
17:04 admsyn it's at a default of 4 in the first place, btw
17:04 admsyn anyway I think you should be able to fiddle with it on the fly, to see what level you need
17:05 admsyn vade: Q RE: Cocoa windowing, do you know if there's a built in way to get regular callbacks when an NSWindow is in live resize?
17:06 admsyn the problem I've got right now is that we've got to manually fix a "bug" in GLFW by manually calling a display callback when the window resizes, but there doesn't seem to be a callback for when the user grabs the window frame and just sits there
17:06 admsyn i.e. the callback only happens when the window changes shape
17:07 mst1228_ when i include ofAppGLFLWWindow.h i get this error
17:08 mst1228_ Invalid preprocessing directive
17:08 mst1228_ i'm including in testApp.h
17:09 admsyn what's the line of code? sounds like you forgot to put quotes around the file name :)
17:11 vade admsyn: you can get a notification
17:12 admsyn cool, but there's not like a CVDisplayCallback type thing that's just like "draw now, draw now" etc?
17:12 vade there is no default draw runloop
17:12 GuidovanPossum joined #openframeworks
17:12 vade you have to hook into either
17:12 vade NSView's drawRect
17:12 mst1228_ oh duh, spelled include wrong
17:12 vade or your GL's redraw code
17:13 vade I'm not sure how you are driving display
17:13 vade but a normal NSView is drawn lazily, on demand
17:13 admsyn same :) I think it's just GLFW's draw callback
17:13 vade ah, well, then you need to hook into that somewhere
17:13 vade you want to know when the view changes size for live GL updates for uh
17:13 vade view port etc ?
17:13 admsyn yeah, we have NSWindow (and I suppose NSView access via contentView)
17:14 admsyn yeah live GL view updates while in live resize
17:14 vade well
17:14 vade so, if you are rolling your own windowing
17:14 admsyn the problem is that grabbing the window frame seems to stop display callbacks, and there's only further callbacks when the frame changes size, not when it just sits there
17:14 admsyn sounds like it :)
17:14 admsyn well cool, thanks
17:14 vade what do you mean grabbing the windows frame stops display callbacks
17:14 vade thats.. unlikely
17:15 admsyn vOv it does..
17:15 admsyn I haven't anyalzed it very deeply fwiw
17:15 vade what do you mean, specifically, 'grabbing the windows frame'
17:15 vade like
17:15 vade window.frame accessor ?
17:15 admsyn not the title bar, grabbing e.g. the corner to do a resize
17:15 vade oh
17:15 admsyn with the cursor
17:15 vade OH
17:15 admsyn yeah sorry :)
17:15 vade yes, so:
17:15 vade so
17:15 vade a)
17:15 vade if you use a CVDisplayLink to drive display
17:16 vade it does not get called during live resize
17:16 vade you have to handle that separately
17:16 vade now
17:16 vade a caveat
17:16 vade on desktop
17:16 vade CVIDisplayLink runs on a separate thread
17:16 vade but live resize runs on main thread
17:16 vade so you have to serialize access to you CGLContext internally
17:16 vade and call flush on the main thread too to get udpates
17:17 vade I've done live resize before with custom NSView drawing with my own GL code, and CVDisplaylink for normal shit, it was a bit of a nuanced pita
17:17 admsyn yeah :/
17:17 vade I ended up calling CVDisplayLinkStop / Start around the live resize code
17:17 vade and then manually updating when I got a NSNotification callback that the view size udpated
17:17 vade I also, iirc
17:17 admsyn hm, but now there's the extra hurdle that I'd have to do that stuff with GLFW as middle man
17:17 vade had to call NSOpenGLContext update
17:18 vade ah, yea, this is partly why I avoid all that middle man shit to be honest
17:18 vade just makes getting the details right harder
17:18 admsyn yeah, def
17:18 admsyn well, maybe I'll just take a stab at it with a dispatch timer
17:19 admsyn I think "good enough" will do for now, as this is what it does atm: https://f.cloud.github.com/assets/165258/953​491/6db5463e-03f7-11e3-840e-961a49fc8516.png
17:19 vade hm
17:20 vade is GLFW multithreaded?
17:20 vade ie:
17:20 vade is drawing done on a secondary thread a la displaylink?
17:20 admsyn I don't think so, at least not in the configuration we're using it
17:20 vade ok
17:20 * admsyn didn't do the GLFW implementation..
17:20 vade you should be able to get live resize on a  single thread way easier
17:20 vade if GLFW is not calling some GL draw function
17:20 vade its probably a config thing
17:20 vade (during resize)
17:21 admsyn it'd seem like it, but there's a gap in the available callbacks. There's draw callbacks, and then resize callbacks, but not a callback that fires when live resize is happening
17:22 admsyn as in, I think this is a gap in GLFW's exposed callbacks
17:22 vade ah, I see
17:22 admsyn it's actually issue #1 on GLFW's github, and it's more-or-less a "won't fix" from what I interpret
17:23 admsyn as in, they were like "well, you can swap the buffers manually at that point" (which I did, and it works)
17:23 admsyn anyway, thanks for the tips, I'm going to figure out a bit more about GLFW's OSX impl
17:24 Seich joined #openframeworks
17:27 torlanco joined #openframeworks
17:27 vade sorry have to deal with work shit
17:27 vade i could try to find my live resize code somewhere
17:28 admsyn that'd be handy, if only so I don't run into the same gotchas :)
17:28 admsyn I'm off now anyway, but I'll check the logs
17:41 robot joined #openframeworks
17:43 brainmachine joined #openframeworks
17:55 LCID_Fire joined #openframeworks
17:56 Seich joined #openframeworks
17:59 Seich_ joined #openframeworks
18:04 LCID_Fire joined #openframeworks
18:08 Seich_ joined #openframeworks
18:09 superFluid joined #openframeworks
18:14 mst1228 joined #openframeworks
18:20 admsyn joined #openframeworks
18:26 LCID_Fire joined #openframeworks
18:30 LCID_Fire joined #openframeworks
18:32 kikko_fr joined #openframeworks
18:46 LadyK joined #openframeworks
19:15 torlanco joined #openframeworks
19:16 liamstask joined #openframeworks
19:19 Seich_ joined #openframeworks
19:29 admsyn joined #openframeworks
19:29 brainmachine joined #openframeworks
19:46 brainmachine joined #openframeworks
20:05 poggio joined #openframeworks
20:47 jmw_ joined #openframeworks
20:49 GuidovanPossum joined #openframeworks
20:51 admsyn joined #openframeworks
21:02 Seich_ joined #openframeworks
21:06 jmw_ joined #openframeworks
21:22 Seich_ joined #openframeworks
21:27 Seich_ joined #openframeworks
21:35 liamstask joined #openframeworks
21:50 typeclassy joined #openframeworks
22:20 kikko_fr joined #openframeworks
22:36 jmw_ joined #openframeworks
22:38 jmw_ joined #openframeworks
22:42 jmw_ joined #openframeworks
22:48 jmw_ joined #openframeworks
22:52 jmw_ joined #openframeworks
23:01 brainmachine joined #openframeworks
23:16 Seich_ joined #openframeworks
23:21 GuidovanPossum joined #openframeworks
23:32 jmw_ joined #openframeworks
23:36 jmw__ joined #openframeworks
23:36 GuidovanPossum joined #openframeworks
23:52 brainmachine joined #openframeworks
23:53 liamstask joined #openframeworks
23:55 LadyK joined #openframeworks

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