Perl 6 - the future is here, just unevenly distributed

IRC log for #openframeworks, 2014-07-29

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

All times shown according to UTC.

Time Nick Message
00:00 AlexAbraham joined #openframeworks
00:00 AlexAbraham hey
00:00 AlexAbraham anyone klnow how to rename a project for openframeworks in xcode?
00:04 admsyn click the name of the project in the browser should do it, might have to change the product name if that doesn't do it for you
00:05 AlexAbraham under Identity and Type?
00:05 AlexAbraham in xcode6
00:05 admsyn no just in the sidebar on the left, where all the files are
00:06 admsyn click the project, click the name, just like renaming files in the finder
00:06 admsyn then if that doesn't change the product name for you, search for that build setting and do it
00:06 admsyn might want to rename the scheme/target too if you're a neat freak
00:08 AlexAbraham can I rename the folder also
00:08 AlexAbraham right now the folder is videoGrabberExample
00:08 AlexAbraham one of the example openframeworks came with
00:08 admsyn yeah that should be fine, I'd close it in xcode first though
00:09 AlexAbraham how do you rename the scheme/target?
00:10 admsyn if you get the panel with all the build settings, click the target name twice (same deal as in the finder)
00:10 admsyn then I think you can just autogenerate the scheme and it'll do the rest
00:10 admsyn so if you click at the top where it's like "whateverExample Debug" you should get a dropdown for managing schemes
00:13 AlexAbraham it looks like all my paths are out of whack
00:14 AlexAbraham and openFrameworks is red so i think it doesn’t know where it is
00:14 admsyn did you change the folder the project was in?
00:15 admsyn by default OF is expecting apps to be three levels in (like openFrameworks/apps/myApps/theApp
00:15 admsyn )
00:15 AlexAbraham ya...
00:15 admsyn if you change the depth you need to modify the build setting OF_PATH
00:15 AlexAbraham i was able to add the openCv addon again just like you taught me earlier and that worked
00:15 AlexAbraham oh ok
00:15 admsyn it's ../../../ by default you need to change it to whatever depth your project is at now
00:16 admsyn honestly though, i'd just leave it at 3 levels deep unless it's real important or something :p
00:16 admsyn I think you might need to add the openFrameworks project again if that doesn't fix it, it's pretty straightforward
00:18 AlexAbraham where is the folder for openFrameworks
00:18 admsyn as in the xcode project for it?
00:18 AlexAbraham ya
00:18 admsyn libs/openFrameworksCompiled/project/osx
00:19 AlexAbraham nah thats not what i was looking for
00:19 AlexAbraham when you open a project you see a few folders and one of them is openFrameworks
00:20 AlexAbraham left #openframeworks
00:20 AlexAbraham joined #openframeworks
00:20 AlexAbraham also GLUT.frameworks is missing
00:21 admsyn the folder you see in your xcode project isn't an actual folder, it's an xcode "group"
00:21 admsyn those files are in libs/openFrameworksCompiled/project/osx
00:21 admsyn GLUT would be in libs/glut
00:22 AlexAbraham uch I feel like i totally messed this up
00:22 AlexAbraham is it easier just to make a new project?
00:22 AlexAbraham How could I do that?
00:22 admsyn yes for sure
00:22 admsyn project generator, do you have the download off the site or the github version?
00:22 AlexAbraham yes
00:22 admsyn which :p
00:22 AlexAbraham both
00:22 AlexAbraham I have ProjectGenerator
00:22 admsyn ok the one off the site is the easiest, it's just in the root folder and then projectGenerator_osx
00:24 AlexAbraham for the path I select the folder I want it to go in or make a new folder for the project?
00:25 admsyn wherever you want it to go, it'll make a new folder wherever you select that's your app's name
00:25 AlexAbraham also, I tried clicking addons but it wouldn’t do anything
00:25 admsyn so if you're like "mySketch" it'll create a mySketch folder wherever you tell it to with all the xcode stuff inside
00:25 AlexAbraham I can just add those later
00:28 AlexAbraham I think I finally got it :-)
00:28 AlexAbraham BTW This is my first time using xcode and it is so much better than any IDE i have ever used IMO
00:28 admsyn woop
00:28 AlexAbraham :-)
00:29 admsyn yeah it's ok :) visual studio is pretty solid too
00:30 AlexAbraham All I am used to is Eclipse and Android Studio. I learned Java a few months ago and haven’t really got into any desktop application development yet so i have been sticking with mobile in the meantime
00:30 AlexAbraham gahhhhh
00:31 AlexAbraham it said build successful but app didn’t open
00:31 AlexAbraham and AppDebug.app is red
00:31 admsyn yeah that might just be because you have the openframeworks scheme selected
00:31 admsyn it does that sometimes
00:31 admsyn at the top does it say openFrameworks or like yourAppName Debug?
00:31 AlexAbraham under Build?
00:32 AlexAbraham it says
00:32 AlexAbraham HungryCircles | Build openFrameworks: Succeeded | Today at 8:30 PM
00:32 admsyn just at the top, where it's like "play button, stop button, seperator, <selected scheme>"
00:32 admsyn yeah so you have the OF scheme selected
00:32 admsyn which means it's just building openframeworks and then being like "cool, done"
00:33 AlexAbraham :p
00:33 admsyn you need to tell it to build your app, so click where it says openframeworks and select your app
00:34 AlexAbraham where do i click?
00:34 admsyn where it says openframeworks
00:35 AlexAbraham the group/folder thing?
00:35 admsyn between the stop button and "my mac"
00:35 AlexAbraham oh ok
00:35 AlexAbraham now it says build failed
00:36 admsyn what's the error?
00:37 AlexAbraham issue with openCv
00:37 AlexAbraham I will try removing and adding again
00:38 AlexAbraham nah that didn’t work
00:38 AlexAbraham "opencv2/core/core_c.h" file not found
00:38 admsyn is just <file> not found?
00:38 admsyn yeah so you need to add that to your header search path again
00:38 AlexAbraham right i remember
00:39 AlexAbraham what do i add?
00:39 AlexAbraham that file?
00:39 admsyn $(OF_PATH)/addons/ofxOpenCv/libs/opencv/include/
00:42 AlexAbraham finally its working :-)
00:42 admsyn woop
00:42 AlexAbraham thanks for being patient :p
00:42 admsyn np
00:51 admsyn I just managed to type /usr/lolcat/include/ so maybe I need to call it a day
00:52 AlexAbraham joined #openframeworks
01:13 AlexAbraham joined #openframeworks
01:22 AlexAbraham joined #openframeworks
01:47 jedahan joined #openframeworks
01:56 AlexAbraham joined #openframeworks
02:03 AlexAbraham hey anyone know how to mirror image or video grabber?
02:03 AlexAbraham on my mac the camera seems to be mirrored
02:08 AlexAbraham joined #openframeworks
02:31 jedahan joined #openframeworks
04:09 jedahan joined #openframeworks
04:42 jekyllRo joined #openframeworks
04:56 jekyllRo left #openframeworks
06:25 ncls joined #openframeworks
07:18 mihi_tr joined #openframeworks
07:36 ofarturo joined #openframeworks
07:51 mihi_tr joined #openframeworks
08:48 neue joined #openframeworks
09:02 nylki joined #openframeworks
10:32 ofarturo joined #openframeworks
11:20 workergnome joined #openframeworks
11:26 underdoeg joined #openframeworks
11:30 underdoeg left #openframeworks
11:48 sebllll_ joined #openframeworks
12:22 ofarturo joined #openframeworks
13:06 workergnome joined #openframeworks
13:37 workergnome joined #openframeworks
13:56 nylki_ joined #openframeworks
13:58 AlexAbraham joined #openframeworks
14:03 DrCode joined #openframeworks
14:18 qDot_ joined #openframeworks
14:19 keeran joined #openframeworks
14:23 derekkinsman joined #openframeworks
14:44 jedahan joined #openframeworks
14:53 AlexAbraham hey
14:54 AlexAbraham anyone develop openframeworks for mac?
14:55 AlexAbraham The mouse clicks seem to be off
15:00 AlexAbraham joined #openframeworks
15:05 workergnome joined #openframeworks
15:16 AlexAbraham i found out something new
15:17 AlexAbraham If i use CGWarpMouseCursorPosition to move mouse to 200,200 it moves it out of the window and to point 200,200 on the entire screen
15:17 AlexAbraham is there a way to track mouse position within app window?
15:32 jedahan AlexAbraham I hope so!
15:33 AlexAbraham playing around with it more I realized it does track the mouse inside the window by default
15:33 AlexAbraham it is just a bit off
15:38 workergnome joined #openframeworks
15:43 AlexAbraham is there a way to make an image grayscale?
15:52 workergnome joined #openframeworks
15:58 AlexAbraham or more specifically make an ofColor grayscale
16:00 yu1ch1 joined #openframeworks
16:11 jekyllRo joined #openframeworks
16:35 nylki_ joined #openframeworks
16:51 AlexAbraham anyone have experience with color tracking
16:52 jekyllRo joined #openframeworks
16:54 workergnome joined #openframeworks
16:58 ncls joined #openframeworks
17:10 workergnome joined #openframeworks
17:14 workergnome joined #openframeworks
17:19 GuidovanPossum joined #openframeworks
17:22 AlexAbraham hey is there a way to get the red blue and green values of an ofColor object?
17:22 VbKing joined #openframeworks
17:28 mihi_tr joined #openframeworks
17:49 workergnome_ joined #openframeworks
18:01 nylki_ joined #openframeworks
18:15 mihi_tr joined #openframeworks
18:18 Beliq joined #openframeworks
18:31 mtrythall joined #openframeworks
18:33 AlexAbraham if i do ofLogNotice() << color, it prints out the rgba values to the console
18:33 AlexAbraham but how do i get them?
18:37 mihi_tr joined #openframeworks
18:45 workergnome @AlexAbraham, do you want the hex values or the float values?
18:46 AlexAbraham in truth I want the float values for red green and bluw
18:47 jacres joined #openframeworks
18:48 workergnome then, you just need to do:
18:48 workergnome ofColor myColor(255,255,255,255);
18:49 workergnome myColor.r; // the red value
18:49 workergnome If you want explicitly float values, you can use a ofFloatColor
18:49 workergnome or you can convert them
18:50 AlexAbraham ya they print out weird numbers and letters
18:50 AlexAbraham how do you convert them
18:50 mihi_tr joined #openframeworks
18:52 workergnome So, techically, they’re stored as chars, which only record 0-255, which is their max value.
18:52 AlexAbraham i got it :-)
18:52 workergnome But if you log a char, ofLog thinks that it’s a character, not a int.
18:52 AlexAbraham int(color.r)
18:52 workergnome up.
18:52 workergnome yup
18:52 AlexAbraham noiice
18:54 workergnome Tricksy types.
18:54 jedahan joined #openframeworks
19:01 AlexAbraham do you know how to set the color of a pixel in an image?
19:02 AlexAbraham I am trying to do setColor)
19:02 AlexAbraham setColor(x, y, ofColor::white) but it doesn’t do anything
19:03 workergnome what kind of image
19:03 workergnome ofImage?
19:03 AlexAbraham ya
19:04 workergnome it is setColor, but when you’re done setting the pixels, you need to call ofImage::update() to get them pushed back up to the texture.
19:05 workergnome http://openframeworks.cc/documentati​on/graphics/ofImage.html#show_update
19:06 nylki_ joined #openframeworks
19:07 AlexAbraham is that expensive? can I do it inside the update method of my app?
19:08 workergnome It’s relatively expensive, but you can definitely do it in the update method.
19:09 workergnome the reason it’s broken out into it’s own method is so that it doesn’t have to happen every time you modify each pixel.
19:09 AlexAbraham i accidentally put it in my for loop so it did it after every pixel :p
19:09 workergnome That would be expensive, yes.
19:26 nylki_ joined #openframeworks
19:42 yu1ch1 joined #openframeworks
20:00 AlexAbraham gahhh
20:00 jekyllRo joined #openframeworks
20:01 AlexAbraham anyone know how to deal with EXC_BAD_ACCESS error?
20:11 workergnome It usually means that you’re trying to read from a pointer that doesn’ t point anywhere.
20:13 pizthewiz joined #openframeworks
20:13 AlexAbraham I figured as much but I have no idea why the issue is being thrown
20:14 workergnome What line is throwing it?
20:14 AlexAbraham https://gist.github.com/AlexA​braham1/d8381bb7a025f64a1a1f
20:15 AlexAbraham it calls drawCircle() inside draw() and if you look in Circle.cpp the line timesDrawn++ throws the error
20:15 AlexAbraham but if I get rid of the for loop in the draw method entirely it gets thrown somewhere else
20:16 jedahan joined #openframeworks
20:17 workergnome I think that it’s that you have a std::vector<Circle>::size_type, not std::vector<Circle*>::size_type
20:18 workergnome though that probably shouldn’t matter...
20:18 AlexAbraham didn’t work :-(
20:21 workergnome Any reason you’re using a vector of circle pointers instead of a a vector of circles?
20:21 AlexAbraham i will try to change that but i think i got errors earlier
20:22 DrCode joined #openframeworks
20:24 AlexAbraham i can’t do Circle circle = new Circle()
20:25 workergnome No.  You don’t need to—  you just need to do Circle circle;
20:26 workergnome Let me think..
20:26 workergnome I may be wrong here.
20:26 workergnome No
20:26 workergnome That should wor.
20:26 workergnome wokr
20:27 workergnome Stroke tempStroke(can, currentMesh);
20:27 workergnome tempStroke.points = points;
20:27 workergnome tempStroke.colors = colors;
20:27 workergnome canvas->savedStrokes.push_back(tempStroke);
20:27 * workergnome works for me
20:27 workergnome (from my current code)
20:27 AlexAbraham get another EXC_BAD_ACCESS error
20:27 AlexAbraham on the line
20:27 workergnome Hm.
20:27 AlexAbraham class Circle {
20:28 AlexAbraham is it a problem that there are no circles in the vector in the beginning
20:28 AlexAbraham and the method looping through the vector in draw() is looping through an array of 0
20:33 workergnome It shouldn’t ever be called—since circle.size() == 0 immediately.
20:35 workergnome interestingly, if I run that code, I don’t get any crashes.  It doesn’t do much, but it runs.
20:35 AlexAbraham wait
20:35 AlexAbraham what does it do?
20:35 AlexAbraham just shows a black screen?
20:36 workergnome A flash of video, then a black screen.
20:36 workergnome Do you have a camera attached?
20:36 AlexAbraham put something pink in front of camera
20:36 AlexAbraham ya
20:36 workergnome interesting
20:36 workergnome I get dots.
20:37 AlexAbraham well i restarted xcode and that didn’t help
20:37 AlexAbraham :’(
20:37 workergnome roughly in the outline of the shape of the object.
20:38 AlexAbraham if you hit spacebar you should be able to draw
20:38 AlexAbraham and then hit spacebar again to stop
20:38 workergnome Yup.
20:38 AlexAbraham sweet!
20:38 workergnome It works.
20:38 AlexAbraham GRRRRRRRRR
20:39 workergnome I am running it via make, not xCode.
20:39 workergnome Which version of OF are you using?
20:39 AlexAbraham idk
20:40 AlexAbraham i can try restarting the computer :p
20:40 AlexAbraham be back in a few :D
20:41 mtrythall joined #openframeworks
20:44 AlexAbraham joined #openframeworks
20:44 AlexAbraham well that didnt work :-(
20:45 workergnome try running    make && make run   from the command line in your directoty
20:46 AlexAbraham i got it to work!
20:46 AlexAbraham You gave me an idea :-)
20:46 AlexAbraham I changed the build environment from Debug to Release in xcode
20:46 AlexAbraham its really weird that it wasen’t working in debug but it works in release
20:47 AlexAbraham I guess when in release mode the app ignores whatever the issue is
20:47 AlexAbraham which is still a problem :(
20:47 workergnome But it means that it’s an xCode config issue, not a code problem.
20:48 GuidovanPossum yes I was surprised too at the differences between debug and release builds too
20:54 Awt joined #openframeworks
20:54 jekyllRo joined #openframeworks
21:04 mtrythall joined #openframeworks
21:11 pizthewiz joined #openframeworks
21:29 workergnome left #openframeworks
21:40 jekyllRo left #openframeworks
21:41 workergnome_ joined #openframeworks
21:41 workergnome_ left #openframeworks
22:35 VbKing joined #openframeworks
23:35 jekyllRo joined #openframeworks
23:44 awt joined #openframeworks
23:44 Beliq joined #openframeworks
23:50 Beliq joined #openframeworks
23:53 Hurtzy joined #openframeworks

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