Perl 6 - the future is here, just unevenly distributed

IRC log for #openframeworks, 2014-04-22

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

All times shown according to UTC.

Time Nick Message
00:03 egradman I load a sound with ofSoundPlayer and I can play it.  I load the same sound again (after unloadSound, in a new player, whatever) and I get "ofOpenALSoundPlayer: loadSound(): couldn't generate source for "/opt/kyogen/media/carla/goodbye.aiff": 40964 AL_INVALID_OPERATION"
00:04 pizthewiz joined #openframeworks
00:04 egradman on raspberry pi.
00:05 egradman on 0.8.1
00:05 pizthewiz egradman: Hmm, I haven't used ofSoundPlayer before - does the same thing happen on other platforms?
00:06 egradman let me set that up
00:10 egradman not a fair test on my mac.  uses a different underlying sound player.
00:19 pizthewiz Ahh, maybe a Raspberry Pi specific issue then?
00:26 egradman could be.  sound has always been a real bitch with that kernel.
00:26 egradman I'm going to generate empty movie files and use ofxOMXPlayer.
00:37 egradman ah, codec hell
01:08 waffles joined #openframeworks
01:09 admsyn joined #openframeworks
01:28 vade joined #openframeworks
01:40 boltR joined #openframeworks
01:59 egradman *sigh*. If I load all the soundfiles up-front it works fine.
01:59 egradman That's a weird one.
02:06 boltR joined #openframeworks
03:20 admsyn joined #openframeworks
03:47 vade joined #openframeworks
03:58 boltR joined #openframeworks
06:11 egradman joined #openframeworks
06:20 roxlu joined #openframeworks
06:41 ncls joined #openframeworks
08:40 admsyn joined #openframeworks
08:45 neue joined #openframeworks
11:12 abergmeier joined #openframeworks
11:16 vade joined #openframeworks
11:56 waffles joined #openframeworks
12:23 vade joined #openframeworks
13:19 underdoeg joined #openframeworks
13:21 underdoeg left #openframeworks
14:07 jedahan joined #openframeworks
14:12 vade joined #openframeworks
15:24 admsyn joined #openframeworks
15:28 dine909 joined #openframeworks
15:46 dine909 left #openframeworks
16:52 abergmeier joined #openframeworks
16:54 boltR joined #openframeworks
17:13 decultured joined #openframeworks
17:27 admsyn joined #openframeworks
18:06 admsyn joined #openframeworks
18:47 neue joined #openframeworks
19:24 vade joined #openframeworks
19:27 pizthewiz joined #openframeworks
19:54 sam___ joined #openframeworks
19:54 sam___ this is a stupid question, but how do I move the camera in openframeworks?
19:54 sam___ i basically just want to pan and zoom
19:56 admsyn ofEasyCam will give you some automatic controls, one sec I'll check the methods for ofCamera
19:57 admsyn I think it's just an ofNode though
19:57 sam___ i don't think i want that
19:57 sam___ i don't want the user to control the camera
19:58 sam___ it is an ofnode, so is ofcamera
19:58 admsyn yeah check out the  3d/cameraParentingExample
19:58 sam___ don't think i have that?  i have the iphone distro
19:58 admsyn ah
19:59 admsyn you should still have that though I think?
19:59 * admsyn checks
19:59 admsyn in any case, it's an ofNode, so all these functions should be relevant: http://openframeworks.cc/do​cumentation/3d/ofNode.html
20:00 sam___ right, my issue is, how do i get the ofcamera object?
20:00 admsyn oh I see, there's not one by default
20:00 admsyn you add an ofCamera to your app, and then do cam.begin() cam.end() to draw in it
20:01 sam___ ok thanks
20:02 admsyn yeah you're right the cameraParentingExample isn't in the iOS distro, sorry about that
20:02 admsyn the source is here https://github.com/openframeworks/ope​nFrameworks/blob/master/examples/3d/c​ameraParentingExample/src/ofApp.cpp
20:02 admsyn it's alittle more complex than it needs to be but it might help :/
20:03 sam___ thanks again
20:11 sam___ would you recommend using camera over using something like glTranslatef ?
20:11 admsyn I guess that mostly depends on how much control you'd like to have vs how much you'd like done for you
20:12 admsyn in general you might find yourself fighting OF a bit if you try and do too much in raw GL, there's OF wrappers for most of those things
20:12 admsyn e.g. ofTranslate
20:14 sam___ i did not know about that
20:14 sam___ looks like oftranslate / ofscale should do everything I want
20:15 admsyn cool
20:27 sam___ ok using oftranslate / ofscale the input coordinates no longer seem to correspond to the world coordinates
20:28 sam___ is there a good explanation somewhere of how all this stuff works?
20:29 admsyn do you mean opengl in OF?
20:29 sam___ i guess
20:29 admsyn haha
20:29 admsyn well what's "this stuff"?
20:30 admsyn here's the GL in OF article, btw http://openframeworks.cc/tut​orials/graphics/opengl.html
20:30 sam___ i'm not using opengl directly
20:30 sam___ just the 2d graphics api
20:30 sam___ by "this stuff" i mean I want to actually understand what ofscale is doing
20:31 admsyn oh ok, that's in the opengl article IIRC
20:31 admsyn the matrices bit
20:33 sam___ ok that's pretty straightforward
20:33 sam___ so what I need to do is take the input coordinates and run them through the matrix stack backwards
20:33 admsyn sure
20:33 sam___ is there a built in method for that?
20:33 admsyn the ofPushMatrix() ofPopMatrix() might've been what you were missing
20:34 sam___ well i don't really need push and pop i don't think, I'll just use ofscale and oftranslate
20:34 admsyn by input coordinates do you mean translating commands like "move left" into the appropriate translation?
20:35 admsyn err I worded that funny
20:35 sam___ i mean, i get the screen coordinates of a click/touch
20:35 sam___ and i need to run those through the inverse of my matrix stack to get my world coordinates
20:35 admsyn the touch coordinates come in as screen coordinates though?
20:35 admsyn oh I see
20:35 admsyn yeah
20:36 admsyn I *think* there's an example for exactly that
20:36 * admsyn looks
20:36 sam___ there's a function called ofGetCurrentMatrix(...)
20:37 admsyn yeah you might just be looking for cam.screenToWorld()
20:38 admsyn pointPickerExample
20:38 admsyn evidently not in the iOS distro too, for some reason
20:38 sam___ screentoworld sounds good but I don't have a cam
20:38 sam___ maybe ofGetCurrentViewport()
20:38 admsyn no that's just the dimensions of the viewport
20:39 sam___ oh
20:39 admsyn if you're doing it without a cam then yeah you might have to do some matrix math
20:39 admsyn that's the sort of thing I was talking about w/ "done for you" vs "control"
20:39 sam___ yeah i need to figure out what these matrices actually mean
20:40 sam___ what is the viewport?
20:41 admsyn that's straight from OpenGL, not really an OF thing, http://lazyfoo.net/tutorials/Op​enGL/03_the_viewport/index.php
20:41 admsyn the "cameras" bit of the GL in OF article I posted discusses it briefly
20:43 sam___ wonderful thanks
20:43 admsyn np
20:44 sam___ looks like just multiplying screen coords by the inverse of the transform matrix should work
20:44 sam___ maybe it would have been easier just to use a cam :)
20:45 admsyn pretty much :) that's why it's there
20:45 admsyn but I mean if you've got the time to learn how to DIY it'll keep coming in handy as you dig deeper
21:16 admsyn hey jedahan_ did you ever figure out the opencv 32bit homebrew thing?
21:17 admsyn I was just fighting it yesterday and came accross your issue on the githubs :3
21:37 booltox joined #openframeworks
21:45 pizthewiz joined #openframeworks
22:16 jedahan joined #openframeworks
22:56 pizthewiz joined #openframeworks
23:20 _pizthewiz joined #openframeworks
23:50 jedahan joined #openframeworks

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