Perl 6 - the future is here, just unevenly distributed

IRC log for #openframeworks, 2013-11-06

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

All times shown according to UTC.

Time Nick Message
00:21 liamstask joined #openframeworks
00:21 admsyn joined #openframeworks
00:29 jmw_ joined #openframeworks
00:42 liamstask joined #openframeworks
00:43 jmole joined #openframeworks
00:43 jmole having an interesting problem
00:44 jmole I'm playing a very large video in oF, and I get occasional frame drops when vsync is on, but none when it's off. however, there is tearing when vsync is off. any idea how I can maintain a fast update loop while avoiding screen tearing?
00:45 admsyn do you mean very large as in pixels or length?
00:45 jmole pixels, it's 5606x1402
00:45 admsyn yeah that's a pretty big video :/
00:46 admsyn I don't think there's many ways for you to optimize your video playback via oF APIs, you might have to fiddle with the underlying implementation to tweak it to you needs
00:46 admsyn what OS / hardware specs?
00:46 jmole maybe creating a separate thread for the video player?
00:47 admsyn just throwing it on a different thread won't really make a difference (if it works at all) unless you're *also* doing a ton of non-video drawing at the same time
00:47 jmole I'm on linux, using gstreamer 0.10 backend for oF,  i7 4770k, 32GB ram, nvidia quadro k5000
00:47 admsyn SSD?
00:47 jmole it's just bizarre that it's silky smooth when vsync is off
00:47 jmole yeah
00:47 jmole it's not I/O bound, i've tried running it off a ram disk with the same issues
00:47 admsyn yeah when vsync is off gstreamer is free to do its own thing :)
00:48 admsyn you might be able to use the hap codec
00:48 admsyn I don't remember if there's any OS limitiations on it
00:48 jmole yeah, and update/draw loop is running 4x as fast w sync off
00:48 jmole that's why i wonder about threading it
00:48 admsyn ah HAP is OSX only https://github.com/bangnoise/ofxHapPlayer
00:49 jmole yeah, using MJPEG right now
00:49 admsyn are you doing any drawing as well, or is it basically just a fullscreen video player?
00:49 jmole just a huge video player
00:50 admsyn then I don't think threading it will get you very far, if it even works
00:52 admsyn if your video's across two screens, you *might* get better performance by using one video player per screen?
00:52 admsyn but I'm kinda just guessing, really :)
00:52 admsyn then maybe you could thread them seperately
00:54 jmole experience has shown that one big video plays better
00:54 jmole they all also have to be totally in sync, for several days on end
00:54 jmole which doesn't happen with multiple players
00:55 jmole it's just so bizarre to me that it plays ultra smooth with vsync OFF, but turning it on gives these occasional stutters
00:55 jmole the video frame rate is equal to the monitor refresh rate too
01:06 admsyn it doesn't seem that bizare.. with vsync ON, gstreamer has to make very rigid deadlines, with vsync OFF it's free to drop behind or speed up a bit depending on the ebb and flow of the system
01:06 admsyn there must be some gstreamer params that can be fiddled with, I don't know if you'll have to recompile gstreamer to do it though
01:07 * admsyn does OSX..
01:39 * jmole too, typically.
01:56 Seich_ joined #openframeworks
02:03 typeclassy joined #openframeworks
02:21 brainmachine joined #openframeworks
02:21 vade joined #openframeworks
02:24 Seich joined #openframeworks
02:34 jmw joined #openframeworks
02:37 jmw joined #openframeworks
02:38 jmw joined #openframeworks
03:40 jmw joined #openframeworks
04:03 brainmachine joined #openframeworks
04:18 oneirona1t joined #openframeworks
04:24 admsyn joined #openframeworks
04:36 Seich joined #openframeworks
04:46 Seich joined #openframeworks
04:49 brainmac1ine joined #openframeworks
05:17 jmw joined #openframeworks
06:11 LCID_Fire joined #openframeworks
06:25 wafflepilot joined #openframeworks
06:49 brainmachine joined #openframeworks
06:52 Seich joined #openframeworks
07:03 kikko_fr joined #openframeworks
07:44 jvcleave joined #openframeworks
07:57 Seich joined #openframeworks
08:28 Seich joined #openframeworks
08:30 Seich joined #openframeworks
08:50 petersaints_ joined #openframeworks
08:54 robo joined #openframeworks
09:30 Seich joined #openframeworks
10:31 Seich joined #openframeworks
10:44 kikko_fr joined #openframeworks
11:32 Seich joined #openframeworks
12:32 Seich joined #openframeworks
12:40 bo_ joined #openframeworks
12:59 bo_ hi, anyone here?
13:13 tgfrerer bo_: hi
13:14 bo_ hi, would this be a correct way to calculate pythagoras in 3d, in c++? float ofDist3f2(float x1, float y1, float z1, float x2, float y2, float z2) { return sqrt(((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2) + (z1 - z2) * (z1 - z2))); }
13:17 jvcleave joined #openframeworks
13:18 bo_ it's an extension of the ofdist function already included in the math library of openframeworks
13:26 jmw joined #openframeworks
13:28 tgfrerer yeah, the math seems correct. you can calculate the distance between two points more simply by doing this:
13:28 tgfrerer ofVec3f a;
13:28 tgfrerer ofVec3f b;
13:28 tgfrerer a.distance(b)
13:29 tgfrerer also, if you need to know the length of a vector (i.e. its distance to the origin) do:
13:29 tgfrerer a.length();
13:32 tgfrerer one thing that springs to eye in your original formula is that you seem to subtract startpoint from endpoint, whereas the canonical way to calculate a direction vector is to say: "vector from point A to point B = B-A"
13:33 tgfrerer for the final result this doesn't matter, since the direction of a vector has no effect on its length.
13:33 Seich joined #openframeworks
13:39 jmw joined #openframeworks
13:40 bo_ thanks
14:03 kikko_fr joined #openframeworks
14:06 aa1984 joined #openframeworks
14:07 kikko_fr_ joined #openframeworks
14:07 aa1984 hello, can anybody help me? i'm having some issues with MacOS / Eclipse with oF
14:10 aa1984 oF and examples compile without a problem, however, when i doubleclick any source file eclipse will start complain: in the project settings there are no include directories and so no symbols are found. Did i do some setup steps wrong?
14:13 aa1984 if anybody could help, i also posted the issue on the forums, i'll try rebooting in linux and see if i have the problem there as well. If you have any idea, feel free to pitch in! thanks!
14:23 bschorr joined #openframeworks
14:28 kikko_fr_ joined #openframeworks
14:34 Seich joined #openframeworks
14:37 LadyK joined #openframeworks
14:38 superFluid joined #openframeworks
14:40 vade joined #openframeworks
14:55 jmw joined #openframeworks
15:12 kikko_fr joined #openframeworks
15:35 Seich joined #openframeworks
15:47 brainmachine joined #openframeworks
16:03 vade joined #openframeworks
16:03 Seich joined #openframeworks
16:43 jvcleave_ joined #openframeworks
17:00 wafflepilot joined #openframeworks
17:33 admsyn joined #openframeworks
17:56 liamstask joined #openframeworks
18:01 mst1228 joined #openframeworks
18:03 kikko_fr joined #openframeworks
18:05 admsyn joined #openframeworks
18:07 brainmachine joined #openframeworks
18:07 admsyn1 joined #openframeworks
18:14 LadyK joined #openframeworks
18:41 liamstask what's the best way to prevent the display from auto clearing? i.e., if I only want to render occasionally but I'd like the results to stick around until the next render
18:53 tgfrerer liamstask: ofSetBackgroundAuto(false);
18:54 liamstask tgfrerer: ah - thank you!
18:55 tgfrerer =)
18:56 liamstask it eluded all my search terms :)
19:02 Seich joined #openframeworks
19:07 moofy joined #openframeworks
19:07 moofy o/
19:08 moofy anyone about
19:12 Seich joined #openframeworks
19:13 moofy Having a problem with openGL, in that it seems to be only happy loading 2.1, though this card should support all the way up to 4p0
19:16 Seich joined #openframeworks
19:23 LadyK Hi there...I'm new to shaders, and playing around with Shader Toy. I'm trying to port some code from it to GLSL 150
19:23 moofy heh
19:24 LadyK I'm stuck on texture2D() to texture()
19:24 LadyK any hints, ideas, suggestions, links?
19:24 moofy I can't even get my computer to run glsl 1.5 at the moment :p
19:24 LadyK hmm
19:25 LadyK what's your errors? or console output?
19:25 moofy it[ error ] ofShader: GL_VERTEX_SHADER shader reports:
19:25 moofy ERROR: 0:1: '' :  version '150' is not supported
19:26 moofy though i know for a fact the card supports it
19:26 LadyK This is what I do to problem solve: run the oF example "glInfoExample in the gl examples folder
19:27 LadyK and see what it gives you for info
19:27 moofy Well that's one reason i'm confused
19:27 moofy it's giving me 'opengl version: 2.1'
19:27 moofy but the full report gives okay up to GL 4_0
19:28 admsyn1 moofy: what OS?
19:28 moofy 10.9
19:28 LadyK I've been playing around with Josh's shaders example off the oF github, which has shaders for ES2, GL2 and GL3
19:28 moofy yeah that's what i'm working through
19:30 LadyK IF you are using Josh's examples, are you getting the data folder into your IDE, correctly? That tripped me up initially
19:30 moofy yeah
19:30 moofy oh it works
19:30 moofy it's just only using the opengl 2 file
19:31 moofy took me far too long to work out that you need an ofShader shader; in the header file for that tutorial :p
19:32 vade joined #openframeworks
19:33 LadyK so, you're all good? files are loading and compiling properly?
19:35 tgfrerer moofy: you get opengl 3.2 by default if you use the programmable gl renderer in main.cpp
19:35 tgfrerer that supports glsl 150
19:36 moofy well that's what i thought but seemingly it's not working
19:37 tgfrerer are you getting any error messages?
19:37 moofy unless i'm missing something subtle
19:37 moofy if i comment out everythnig but the 3.2 renderer i get the one i pasted above
19:37 moofy ERROR: 0:1: '' :  version '150' is not supported
19:38 kikko_fr joined #openframeworks
19:39 tgfrerer i you set loglevel to verbose in main.cpp before you initialise opengl, which opengl version dors it spit out in the console?
19:39 moofy sec
19:40 moofy [verbose] ofAppRunner: Version:  2.1 ATI-1.14.21
19:40 moofy [verbose] ofAppRunner: GLSL:     1.20
19:41 moofy [verbose] ofAppRunner: Renderer: AMD Radeon HD 6750M OpenGL Engine
19:42 tgfrerer seems you're running the fixed function renderer
19:42 tgfrerer which oF version are you running?
19:43 moofy 0.8.0
19:43 tgfrerer that's cool
19:45 tgfrerer and you're using ofGLFWWindow?
19:45 tgfrerer that's the 0.8 default
19:47 moofy thinkso
19:47 moofy that's the -> ofSetupOpenGL(1024,768, OF_WINDOW);
19:47 superFluid joined #openframeworks
19:48 fossterer joined #openframeworks
19:49 tgfrerer hm. could you pastebin your main.cpp?
19:49 fossterer Anyone tried ofxFenster addon? Is it possible to set up communication between two windows?
19:50 moofy sure
19:50 moofy http://pastebin.com/dCsjaCjy
19:52 tgfrerer ahhhh
19:52 tgfrerer have a look at testapp.h
19:53 moofy what am i looking for
19:53 tgfrerer there should be a comment about TARGET_OPENGLES
19:53 moofy ah, got nothing
19:53 tgfrerer sorry, my bad.
19:53 moofy :p
19:54 moofy you're trying to help, no bad
19:54 tgfrerer naww, i think i had my hands in there, originally, creating that file, so i feel responsible.
19:54 tgfrerer =)
19:54 admsyn1 bad tim, bad!
19:55 tgfrerer =P
19:55 moofy I am now even more confused.
19:55 tgfrerer but try the following thing: delete lines 14 and 16
19:55 moofy hang on, i'll paste my .h
19:55 moofy http://pastebin.com/8FUX9fYW
19:57 tgfrerer the .h file looks all good ... try deleting lines 14 and 16 in main.cpp
19:57 tgfrerer that's the two lines around ofsetcurrentrenderer(...
19:58 moofy aha
19:58 moofy the #ifdef
19:58 tgfrerer exactly
19:58 moofy woot
19:58 moofy [verbose] ofAppRunner: Version:  4.1 ATI-1.14.21
19:58 moofy [verbose] ofAppRunner: GLSL:     4.10
19:58 tgfrerer yihaaa
19:58 tgfrerer welcome to 2013
19:58 tgfrerer opengl
19:58 tgfrerer =)
19:58 moofy heh
19:59 moofy now to want to kill myself with too much matrix mathematics :p
19:59 tgfrerer sounds like fun!
19:59 moofy the shader tutorial could use a line about adding the ofShader shader; though
20:00 moofy might save someone a headache
20:00 tgfrerer maybe raise an issue on the tutorial's github
20:01 LadyK I'm trying to port some code from Shader Toy to GLSL 150. I'm stuck on texture2D() to texture(). Any hints, suggestions, links?
20:01 moofy will do
20:02 tgfrerer LadyK: could you describe the symptoms you are seeing ?
20:03 vade__ joined #openframeworks
20:03 LadyK sure
20:04 LadyK http://pastebin.com/hmrfch9u
20:04 tgfrerer moofy: btw, if you want some really cool openGL + maths literature, Samuel R. Buss' book is very very good: 3d computer graphics - a mathematical introduciton with opengl
20:04 LadyK Console error : '+' does not operate on 'vec2' and 'vec4'
20:04 moofy i'll check it out, thanks
20:06 jacres LadyK: looks you're adding apples and oranges ;) Are both objects vec4 that you're adding or is one a vec4 and the other a vec2?
20:06 tgfrerer LadyK: looks like a type mismatch. is wat a vec2?
20:06 LadyK yes, it is
20:06 tgfrerer that explains it.
20:06 tgfrerer texture returns a color, which is a vec4
20:07 LadyK ok
20:07 LadyK Can you tell me how texture() differs from texture2D(), by chance?
20:09 brainmachine joined #openframeworks
20:09 brainmachine joined #openframeworks
20:10 LadyK I see that texture2D returns a vec4....
20:10 tgfrerer texture2d is deprecated in programmable gl - since the dimension is already inferred in how you define the sampler (either sampler2d or sampler)
20:10 tgfrerer both return a vec4
20:10 tgfrerer since they return colour sample values
20:12 Seich joined #openframeworks
20:12 LadyK ok, I'm using sampler2D
20:12 tgfrerer that's cool - you can use that in tandem with texture()
20:13 LadyK I'm looking at Dave Hoskins's code - https://www.shadertoy.com/view/Msf3Dr
20:13 LadyK and just trying to port the scene sans shark and bubbles
20:14 tgfrerer ahh, nice!
20:14 LadyK I understand that texture2D is depreciated, and texture() should be used with sampler2D....I'm just a bit stuck on how to think through the port of that clip of code
20:14 tgfrerer that webgl page gave my old macbook a bit of a work-out.
20:14 LadyK ha ha ha
20:15 tgfrerer but at least i can switch off the heating for a while.
20:15 LadyK yeaaaaah
20:15 LadyK ;)
20:15 tgfrerer =)
20:16 tgfrerer awlright - gtg... see you later!
20:18 LadyK so, does anyone have any hints about going from texture2d to ...texture()?
20:19 LadyK I'm not sure if that's even the correct conclusion to go to
20:21 andur joined #openframeworks
20:23 fossterer Hi I'm receiving this error today but not till this day - "../../../../../libs/openFramew​orks/graphics/ofTrueTypeFont.h - Line 83 error: ‘bool ofTrueTypeFont::bLoadedOk’ is protected "
20:29 superFluid joined #openframeworks
20:56 superFluid joined #openframeworks
21:00 liamstask joined #openframeworks
21:01 fossterer Hi I'm receiving this error today but not till this day - "../../../../../libs/openFramew​orks/graphics/ofTrueTypeFont.h - Line 83 error: ‘bool ofTrueTypeFont::bLoadedOk’ is protected "
21:01 moofy joined #openframeworks
21:04 brainmachine joined #openframeworks
21:18 tgfrerer LadyK: texture2d == sampler2d + texture()
21:18 LadyK tgfrerer: yeah?
21:19 tgfrerer yep, it's just the more modern (glsl 150 way to express samplers)
21:19 LadyK that sheds some light
21:19 tgfrerer =)
21:19 LadyK on it
21:20 LadyK I'm wondering if it's crazy to port this to glsl 150.
21:21 tgfrerer also, if you port webgl code, that's GLSL ES, which looks very similar to "old" fixed function GLSL
21:21 tgfrerer it's not crazy at all!
21:21 moofy hmm
21:21 LadyK there are so many texture2D() calls and manipulations, I'm having a hard time getting my head around how to translate it
21:21 moofy so glsl is more akin to 120?
21:22 vade joined #openframeworks
21:22 moofy is there anything worth reading thot explains the differences
21:22 tgfrerer moofy: GLSL ES prior to OpenGL ES 3.0 is, yes.
21:23 Seich joined #openframeworks
21:23 moofy i wasn't even aware there was an es 3.0
21:23 moofy i need to read up on all this
21:23 tgfrerer i'm usually reading the language cheat sheets - these one-page pdfs with all the commands listed in different colours
21:24 moofy hmm
21:24 tgfrerer also, if you use duckduckgo as your default search engine, the charm "!gl <youropengl command>" will find the opengl manpage for you
21:24 LadyK ooo...do you have any links?
21:24 moofy so is webgl mixing glsl with javascript?
21:24 tgfrerer webgl uses opengl es -- 2.0 as far as i know, but i'm not an expert on webgl
21:26 tgfrerer http://khronos.org/webgl
21:27 LadyK cool...ok...thanks
21:27 LadyK I'll keep plugging
21:28 tgfrerer if you google "opengl cheat sheet" you'll get the opengl 3.2 api quick reference card, that's what i meant with the cheat sheets earlier. I'd paste you the link, but i'm on arch linux behind three terminal sessions and copy&pasting is a bit erratic on my machine
21:28 moofy heh
21:30 LadyK tgfrerer: no worries, I'm on it. :)
21:30 tgfrerer =)
21:48 Seich joined #openframeworks
21:56 robot joined #openframeworks
21:59 admsyn joined #openframeworks
22:09 moofy joined #openframeworks
22:17 Seich joined #openframeworks
22:41 torlanco joined #openframeworks
22:50 torlanco joined #openframeworks
22:51 superFluid joined #openframeworks
22:54 superFluid joined #openframeworks
22:58 Seich joined #openframeworks
23:05 superFluid joined #openframeworks
23:12 torlanco joined #openframeworks
23:41 Seich joined #openframeworks

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