Perl 6 - the future is here, just unevenly distributed

IRC log for #openframeworks, 2014-02-08

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

All times shown according to UTC.

Time Nick Message
01:24 finger563 joined #openframeworks
01:25 nicedice_ joined #openframeworks
01:48 dantheman joined #openframeworks
02:44 dantheman joined #openframeworks
02:45 dantheman joined #openframeworks
02:58 finger563_ joined #openframeworks
03:28 finger563_ hey @jvcleave, question: you had a problem getting buffers from the encoder hardware?
03:29 finger563_ i'm having a problem where it hangs on a semaphore
03:44 dantheman joined #openframeworks
03:59 dantheman_ joined #openframeworks
04:21 DrCode joined #openframeworks
04:25 boltR joined #openframeworks
05:38 boltR joined #openframeworks
05:50 finger563 joined #openframeworks
06:07 jedahan joined #openframeworks
08:12 dantheman_ joined #openframeworks
09:25 dantheman_ joined #openframeworks
09:26 dantheman_ left #openframeworks
09:26 LCID_Fire joined #openframeworks
09:47 AfterBlend4D joined #openframeworks
09:56 nylki joined #openframeworks
09:58 LCID_Fire_ joined #openframeworks
10:06 jonbro joined #openframeworks
11:58 phserr joined #openframeworks
12:20 ofarturo joined #openframeworks
12:45 Pando_ hi, I have now a problem with texturing an ofMesh
12:46 Pando_ so I've made it a triangle fan to make a disc shape, and that part is ok
12:46 robot joined #openframeworks
12:47 Pando_ what I fail to understand is that it simply cannot be textured. in spite of the fact it is pretty straightforward
12:47 Pando_ I set texture coordinates to the disc, which I suppose are good, and I bind/unbind the texture image before/after calling mesh.draw
12:49 Pando_ if someone here has an idea about what could go wrong, help is appreciated :-)
12:54 jonbro joined #openframeworks
13:51 ofarturo joined #openframeworks
14:02 AfterBlend4D joined #openframeworks
14:39 Hurtzy joined #openframeworks
14:45 robot joined #openframeworks
14:54 LCID_Fire_ joined #openframeworks
15:13 yns joined #openframeworks
15:15 yns hi, i'm looking for some help getting my of projects retina display proof (on osx)
15:15 yns anybody experience with that?
15:16 phserr joined #openframeworks
15:16 yns left #openframeworks
15:18 yns joined #openframeworks
15:18 yns left #openframeworks
15:20 yns joined #openframeworks
15:20 yns hi i'm looking for some help with the macbook rpo retina diplsay in relation to of, anybody having expirience with that?
15:21 yns joined #openframeworks
15:21 yns sorry keep on making mistakes with my new irc client but I'm still here :)
15:24 LCID_Fire_ joined #openframeworks
15:30 yns joined #openframeworks
15:50 kgtddsd joined #openframeworks
15:53 dantheman joined #openframeworks
16:02 AfterBlend4D joined #openframeworks
16:18 yns joined #openframeworks
16:23 yns joined #openframeworks
16:26 LCID_Fire joined #openframeworks
16:41 LCID_Fire_ joined #openframeworks
16:54 phserr joined #openframeworks
16:58 admsyn joined #openframeworks
17:14 LCID_Fire joined #openframeworks
17:31 yns does anybody know how to make OpenGL draw actual pixels on a macbook pro retina display?
17:31 admsyn yns: I think that has more to do with how the app / opengl context is configured
17:32 yns hm
17:32 yns how should that be configured?
17:32 admsyn https://developer.apple.com/library/mac/docu​mentation/GraphicsAnimation/Conceptual/HighR​esolutionOSX/Introduction/Introduction.html
17:32 yns and where?
17:32 admsyn one sec I'm taking a look at it too
17:32 yns thx
17:32 yns I'm looking as well
17:32 admsyn If I remember correctly, it's pretty straightforward
17:32 admsyn but getting oF to act right will probably be tricky
17:33 yns oh :(
17:33 admsyn you might just need to multiply everything by 2 (or divide by 2)
17:33 yns yeah that makes sense
17:33 yns well at least i could cope with that
17:34 admsyn you might want to look into GLFW and its options for doing that
17:34 yns since i'd be drawing double the amount of pixels
17:34 admsyn GLFW is what OF uses to get windows and the OpenGL context, so if they've got a post somewhere about retina it'll probably have some info you can use
17:34 yns you mean create a shader that duplicates the amount of pixels?
17:34 yns ah ok
17:35 admsyn no it wouldn't be a shader I don't think
17:35 yns i got a tip from the forum about setting the plist property High Resolution Capable to YES
17:35 admsyn or rather, I don't think you'd have to take it into account at the shader level
17:35 admsyn yeah that sounds about right
17:35 yns which actually does make every pixel an actual pixel
17:35 admsyn I'd imagine some stuff will break or be weird, though
17:35 yns yeah but the problem is i end up with a really small window inside the main window in which everything gets rawn
17:36 admsyn yeah so that's probably where you need to do something with GLFW
17:36 yns where are those things with GLFW done in the openFrameworks code/stack?
17:36 admsyn you can get the GLFW window from your window pointer
17:36 admsyn one sec
17:37 yns k
17:38 admsyn ofGetWindowPtr will give you the window
17:38 admsyn and if you're using GLFW (default in 0.8.0) then (ofAppGLFWWindow *)ofGetWindowPtr() will give you your access to GLFW
17:39 yns okay
17:39 yns and than i gut use ofAppGLFWWinow's methods to change its size?
17:39 yns gut = could
17:41 admsyn actually I don't know, I thought it was more exposed
17:41 admsyn you can get the NSOpenGLContext, or the NSWindow
17:41 admsyn I guess it depends on what exactly you're seeing
17:42 yns hm
17:42 yns maybe ofAppGLFWWindow::resize_cb?
17:42 admsyn is it like the top 1/4 of the window is where everything goes, and the rest is that light grey default cocoa colour?
17:42 admsyn that's the resize callback
17:42 admsyn i.e. a function that gets called whenever the window resizes
17:42 admsyn probably won't help
17:43 yns iit's in the bottom left 1/4 of the screen
17:43 yns but yeah
17:43 admsyn brb
17:43 yns the rest is that light grey default cocoa color
17:43 yns ok
17:43 LCID_Fire__ joined #openframeworks
17:45 admsyn oh right yeah, because cocoa's coordinates are bottom = 0
17:45 admsyn so it might just be a call you need to make on the NSOpenGLContext, to double its size
17:46 admsyn this might get convoluted :)
17:46 yns hm
17:46 yns :)
17:46 yns hehe
17:46 admsyn so (ofAppGLFWWindow *)ofGetWindowPtr() will give you the GLFW window
17:46 yns where would you do that call
17:46 yns uhu
17:47 admsyn (ofAppGLFWWindow *)ofGetWindowPtr()->getNSGLContext() will give you the NSOpenGLContext
17:47 admsyn you could do it in setup() I think
17:47 yns ok
17:47 admsyn so like NSOpenGLContext * ctx = (ofAppGLFWWindow *)ofGetWindowPtr()->getNSGLContext(); is your first bit
17:47 yns uhu
17:47 admsyn then ctx.view will get you the NSView
17:48 admsyn and here's where I go get breakfast and leave you to figure the rest out :)
17:48 admsyn (I'll be back in 20)
17:48 yns hehe ok thanks :)
18:00 LCID_Fire joined #openframeworks
18:03 ofarturo joined #openframeworks
18:11 naero joined #openframeworks
18:30 yns joined #openframeworks
18:31 yns i want to create the following    NSOpenGLContext * ctx = (ofAppGLFWWindow *)ofGetWindowPtr()->getNSGLContext();
18:31 yns but NSOpenGLContext is not defined
18:32 yns what should i include to be able to us that?
18:35 ofTheo joined #openframeworks
18:36 yns want to create the following    NSOpenGLContext * ctx = (ofAppGLFWWindow *)ofGetWindowPtr()->getNSGLContext();
18:36 yns but NSOpenGLContext is not defined
18:36 ofarturo joined #openframeworks
18:36 yns what should i include to be able to us that?
18:37 ofTheo <Cocoa/Cocoa.h> at the top of testApp
18:39 yns thanks!
18:39 yns any tips on how i could have figured that out myself?
18:40 ofTheo Anything to do with NS… is apple's cocoa language
18:40 yns it fails to build
18:40 ofTheo you actually need
18:40 ofTheo NSOpenGLContext * ctx = (NSOpenGLContext * ) ( (ofAppGLFWWindow *)ofGetWindowPtr() )->getNSGLContext();
18:41 ofTheo and
18:41 ofTheo you need to set the file type of testApp.cpp to Objective C++
18:42 ofTheo http://pastebin.com/ARqMdgfw
18:42 ofTheo In the left pane select testApp.cpp
18:42 ofTheo in the right pane select from the type: drop down
18:42 ofTheo Objective-C++ source
18:42 ofTheo then it should work
18:43 ofTheo curious - what are you doing with the ctx
18:43 yns i want to change the size of the window in which stuff gets drawn
18:44 yns i'm setting High Resolution Capable in the plist file to YES
18:44 yns in order for openGL to draw actual pixels on my retina screen
18:44 yns (instead of drawing a block of 4 for every pixel)
18:44 yns bu the problem is i get a 1/4 window inside the main of window in the bottom left corner in which everything is drawn
18:46 yns thanks your suggestion works by the way
18:46 yns do you think I'm on the right track to fix my problem?
18:48 ofTheo hmm -
18:48 ofTheo I saw your forum post.
18:48 ofTheo what does this print out:
18:49 ofTheo cout << ofGetWidth() " " << ofGetScreenWidth() << " " << ofGetWindowWidth() << endl;
18:49 ofTheo whoops:
18:49 ofTheo cout << ofGetWidth() << " " << ofGetScreenWidth() << " " << ofGetWindowWidth() << endl;
18:50 yns :)
18:50 yns 1024 1920 1024
18:51 finger563 joined #openframeworks
18:52 ofTheo so I assume in hi dpi coords your window size is really 2048 x 1536
18:52 yns 2560 x 1600
18:53 ofTheo can you try:     ofViewport(ofRectangle(0, 0, 2560, 1600));
18:53 ofTheo at the top of testApp::draw
18:53 yns hm it's half the screen now
18:54 yns instead of 1/4
18:54 ofTheo hmm
18:54 ofTheo can you fiddle with the numbers to get fullscreen?
18:54 yns sure
18:55 yns ah native resolution is 2880 x 1800
18:55 yns i see now on the apple store
18:56 ofTheo sure - but thats different from the size of your window
18:56 yns yea
18:56 yns but even trying ofViewport(ofRectangle(0, 0, 2880*2, 1800*2)); gives me a half filled screen
18:56 ofTheo huh weird
18:57 ofTheo can you put a photo / screenshot up?
18:57 yns sure
18:58 yns hm do you know where i can quickly can upload a photo?
18:58 yns without accounts and stuff
18:58 ofTheo http://imgur.com
18:58 yns ah yeah
18:59 yns http://imgur.com/qZCS0WO
18:59 yns thats with but even trying ofViewport(ofRectangle(0, 0, 2880*2, 1800*2))
18:59 yns minus but even trying
19:00 ofTheo yeah
19:00 ofTheo I know why
19:01 ofTheo give me one sec
19:01 yns ok
19:01 ofTheo I'll have you try a couple of things
19:01 yns ok cool thanks
19:05 yns ofViewport(ofRectangle(0, -1536/2, 2048, 1536));
19:05 yns seems to do the trick
19:06 jvcleave finger563 - re:buffers you mean as in the callback isn't firing when filled?
19:06 ofTheo hmm
19:07 ofTheo yeah :)
19:07 yns :)
19:07 ofTheo can you try changing all calls to glfwGetWindowSize in ofAppGLFWWindow.cpp
19:08 ofTheo to: glfwGetFramebufferSize
19:08 yns oh cool!
19:08 yns seems like a way more elegant fix to me
19:08 yns but i guess it still will start drawing at half of the screen right?
19:09 yns that's something i still don't understand
19:09 finger563 @jvcleave hey! and i'm not quite sure but it seems like that might be the case or for some reason there's a deadlock somehwere
19:09 finger563 i've gotten around it mostly
19:09 finger563 although i'm curious
19:09 finger563 how did you get such high quality encoding out of your video?
19:09 finger563 cause if i set my bitrate too high it crashes
19:09 ofTheo I think it will work properly
19:10 ofTheo but you won't need the ofViewport call
19:10 finger563 but if i set it high enough that it works the video quality is pretty bad -> full of artifacts and such
19:10 ofTheo could you do the call to:     cout << ofGetWidth() << " " << ofGetScreenWidth() << " " << ofGetWindowWidth() << endl;
19:10 ofTheo in testApp::draw
19:10 yns sure give me a minute
19:11 jvcleave finger563 - did you get an OMX error code when it crashes?
19:11 finger563 it just hangs
19:13 yns 2048 1920 2048
19:13 finger563 my problem is that i make the call to get the buffer, but it doesnt return
19:13 yns with the glfwGetWindowSize calls replaced with glfwGetFramebufferSize and no ofViewport
19:14 stephanschulz joined #openframeworks
19:14 ofTheo nice
19:14 ofTheo does it work?
19:14 yns jup :)
19:15 ofTheo that was easy :)
19:15 yns yeah
19:15 yns i'll post it in the forum for future reference
19:15 yns thanks!!
19:15 ofTheo its not a complete fix
19:15 yns oh?
19:15 ofTheo as screen resolution is not correct
19:15 ofTheo I bet mouse coords don't come in okay either
19:16 yns ah yeah
19:16 yns mouse coordinates makes sence
19:16 ofTheo I think it could be an easy fix though
19:16 yns enlighten me:)
19:16 ofTheo I will probably add something line window->enableRetina(); for ofAppGLFWWindow
19:16 ofTheo then it will do the calls and handle the multiplying of values.
19:16 yns oeh that would be great!
19:17 yns maybe i could help you with that
19:17 ofTheo I do this as a PR to the OF repo and post a link in the forum after your post.
19:17 yns i'm happy to do the work if you tell me what to do?
19:17 ofTheo yes - would be helpful to have someone test it!
19:17 yns sure
19:17 ofTheo I don't have a retina screen
19:17 yns ah yeah
19:17 yns that makes it hard
19:17 ofTheo I can work on it in about 30 mins - will you still be on irc?
19:18 yns sure
19:18 ofTheo cool cool, I'll be back in a little bit :)
19:18 yns i might get dinner from my gf in the mean time
19:18 yns but i'll stay around
19:18 yns :)
19:18 yns see you in a bit
19:29 boltR joined #openframeworks
19:40 keeran anyone know which ofxMSAInteractiveObject is best to use (flightphase/obviousjim or memotv repo?)
19:53 Razorien joined #openframeworks
19:54 ubn29021 joined #openframeworks
19:54 ubn29021 Hey all, after my first tries in OpenFrameworks I'm trying to use 'ofxVirtualKinect'. I am using version 0.8, but ofxVirtualKinect doesn't seem to be included, or am I missing something?
19:56 ofTheo yns: I think I have something working
19:56 yns ok cool
19:56 yns where is it :)
19:58 ofTheo you'll need to backup your ofAppGLFWWindow.cpp and .h files
19:58 ofTheo then grab these: https://gist.github.com/ofTheo/8889250
19:58 ofTheo you'll still need to enable retina via the plist
19:58 yns ok
19:58 ofTheo but the mouse and screen coords should all be in retina coords now
19:58 yns ok
19:58 ofTheo also ofSetupOpenGL(1024,768, OF_WINDOW);
19:58 ofTheo will give you a window 1024x768
19:59 ofTheo so it will be a lot smaller
19:59 ofTheo so if you want a 2048 x 1536 window you need to do:
19:59 yns yeah that is a good thing in my opinion
19:59 ofTheo ofSetupOpenGL(2048, 1536, OF_WINDOW);
19:59 ofTheo right!
19:59 ofTheo once you copy those files in - the eventsExample in examples/events/
20:00 ofTheo is a good example to test with
20:00 ofTheo it will show the mouse coords and also the window coords when you resize the window
20:00 yns ok
20:00 yns i'll have a look
20:01 yns so where do i put those files exactly?
20:02 yns where can i find the original ofAppGLFWWindow.cpp
20:02 ofTheo OF/libs/openFrameworks/app
20:03 ncls joined #openframeworks
20:04 ofTheo when you get it all working. try the events example but copy paste the contents of this into it: https://gist.github.com/ofTheo/8889382
20:05 ofTheo it will also draw the window position and allow you to check fullscreen is working
20:05 yns okay
20:06 yns I'm going to have a little bite ill be back in 20 minutes
20:06 ofTheo cool cool
20:07 yns i'll put my computer to sleep (and disconnect) but i'll be back!
20:08 ubn29021 is 'ofxVirtualKinect' included with OpenFrameworks 0.8, or should I download it somewhere? :)
20:11 ofTheo https://github.com/kylemcdonald/ofxVirtualKinect
20:17 ubn29021 ofTheo: woops, sorry there.. Somehow had 'ofxVirtualKinect' on my copy/paste because I found that one before. Actually meant 'ofxKinectPlayer' :)
20:17 ubn29021 which is supposed to allow you to 'play' kinect data without a kinect being present
20:18 ofTheo thats also not part of ofxKinect
20:18 ofTheo best bet is google :)
20:26 finger563 joined #openframeworks
20:29 ncls ofTheo: hi ! did you manage to get your kinect working ?
20:29 ofTheo The v2?
20:31 ncls mh, dunno, wasn't you who was looking for the right Kinect to buy ?
20:31 GuidovanPossum joined #openframeworks
20:32 ofTheo oh - well I just merged in a PR which allows for both 1473 and 1414 to work in windows
20:32 ofTheo *in OF
20:32 ofTheo also motor support for 1473 Kinect and K4W
20:32 ncls a PR ?
20:32 ofTheo Pull Request
20:32 ofTheo :)
20:32 ofTheo not sure though if I was asking about which one to buy though
20:33 ncls ofTheo: ok
20:33 ncls confused, sorry
20:33 ofTheo no problem!
20:33 ofTheo the good news is that the current OF master branch has a lot better kinect support worked in
20:34 ncls good to know !
20:35 ncls I should buy one
20:35 ofTheo the current only downside is the new 1473 model turns off the depth stream when the tilt motor is moving.
20:36 nylki joined #openframeworks
20:48 finger563 joined #openframeworks
21:01 yns joined #openframeworks
21:07 yns ofTheo: it does not seem to work, but i'm not sure i did everything correctly
21:07 ofTheo what is the issue you are getting
21:08 yns joined #openframeworks
21:08 yns the mouse coordinates go from -450,-141 to 1469,1058
21:08 yns so i guess your code is applied
21:09 yns since it starts at -450,-141
21:09 ofTheo yeah that is weird
21:09 yns also the window i see isn't as small as i expected
21:09 ofTheo in your console what does it say next to: pixelScreenCoordScale
21:09 yns 1
21:09 ofTheo ahh
21:09 ofTheo weird
21:09 yns ah i should set a retina setting
21:09 yns ?
21:09 ofTheo no - I was trying to make it auto detect
21:09 yns hm
21:10 ofTheo okay will try something
21:10 ofTheo did you set the plist?
21:10 ofTheo you will still have to do that
21:10 yns ah i dindt sorry
21:11 yns not for this project
21:12 yns ah yeah that makes a big difference
21:12 yns smaller window as expected
21:12 yns coordinates from -900,-1050 to 2939,1349
21:13 ofarturo joined #openframeworks
21:13 ofTheo the negative coordinates is that when the mouse is offscreen?
21:13 yns jup
21:13 ofTheo what are the values when the mouse is on the top left corner of the window?
21:14 ofTheo and what is it in the bottom right corner of the window?
21:14 yns 0,0
21:14 yns 1024,768
21:15 ofTheo great
21:15 yns yeah
21:15 ofTheo if you hit 'f' does it toggle fullscreen?
21:15 yns yes :)
21:15 ofTheo and when it goes out of fullscreen the window size / position returns to where it was?
21:16 yns yes
21:16 ofTheo great :)
21:16 yns yeah!
21:16 ofTheo I made a pull request with those changes here: https://github.com/openframew​orks/openFrameworks/pull/2801
21:17 yns great!
21:17 ofTheo btw if you need to know what the coordScale is you can call the getPixelScreenCoordScale() of ofAppGLFWWindow
21:17 yns ok cool
21:20 ofTheo thanks for helping me test :)
21:20 yns sure no problem!
21:20 yns thanks for the fix!
21:22 yns how can i address ofAppGLFWWindow?
21:22 yns can i get a pointer to it somehow or something?
21:23 ofTheo (ofAppGLFWWindow *)ofGetWindowPtr() )-> getPixelScreenCoordScale();
21:23 ofTheo whoops:
21:23 ofTheo ( (ofAppGLFWWindow *)ofGetWindowPtr() )-> getPixelScreenCoordScale();
21:23 ofTheo should work
21:23 ofTheo you'll need to include ofAppGLFWWindow.h at the top of the file
21:24 ofTheo ( (ofAppGLFWWindow *)ofGetWindowPtr() )->getPixelScreenCoordScale();
21:24 yns thanks
21:24 yns i got it
21:24 ofTheo cool
21:25 yns so that is the scaling factor you should use to draw the "simulated resolution"?
21:25 ofTheo yeah -
21:25 yns cool!
21:25 ofTheo so you font would want to be its non-retina size *  that value
21:25 ofTheo *your
21:25 ofTheo etc
21:25 yns yea
21:26 ofTheo if you notice any more issues please mention them on that Pull Request
21:26 yns sure
21:26 ofTheo thanks!
22:04 testnaero joined #openframeworks
22:22 phserr joined #openframeworks
22:44 AfterBlend4D joined #openframeworks
23:41 dantheman joined #openframeworks
23:46 jedahan joined #openframeworks

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