#jogamp @ irc.freenode.net - 20141026 05:06:25 (UTC)


20141026 05:06:25 -jogamp- Previous @ http://jogamp.org/log/irc/jogamp_20141025050624.html
20141026 05:06:25 -jogamp- This channel is logged @ http://jogamp.org/log/irc/jogamp_20141026050625.html
20141026 07:12:21 * monsieur_max (~maxime@anon) has joined #jogamp
20141026 07:49:31 * monsieur_max (~maxime@anon) Quit (Quit: Leaving.)
20141026 09:12:25 * monsieur_max (~maxime@anon) has joined #jogamp
20141026 09:45:32 * b00t_ (b00t@anon) has joined #jogamp
20141026 09:46:56 * b00t_ (b00t@anon) Quit (Client Quit)
20141026 09:56:20 * rmk0 (~rmk0@anon) Quit (Remote host closed the connection)
20141026 09:59:20 * Eclesia (~eclesia@anon) has joined #jogamp
20141026 09:59:31 <Eclesia> good morning
20141026 10:09:22 * rmk0 (~rmk0@anon) has joined #jogamp
20141026 10:47:50 <Eclesia> living creatures in here ?
20141026 10:56:45 * gouessej (5279c0a5@anon) has joined #jogamp
20141026 10:57:01 <gouessej> Hi
20141026 10:57:22 <gouessej> I'm alive ;)
20141026 10:57:23 <Eclesia> hi
20141026 11:02:52 <monsieur_max> same
20141026 11:07:35 <Eclesia> the french team ^^
20141026 11:10:12 <monsieur_max> hehe
20141026 11:10:27 <monsieur_max> how is your fog shader ?
20141026 11:11:04 <Eclesia> basic
20141026 11:11:32 <Eclesia> I have what I needed, it will improve with time now
20141026 11:58:36 * rmk0_ (~rmk0@anon) has joined #jogamp
20141026 12:00:26 * rmk0 (~rmk0@anon) Quit (Ping timeout: 250 seconds)
20141026 12:13:40 * monsieur_max (~maxime@anon) Quit (Quit: Leaving.)
20141026 12:56:43 * Eclesia (~eclesia@anon) Quit (Ping timeout: 260 seconds)
20141026 12:59:41 * Eclesia (~eclesia@anon) has joined #jogamp
20141026 13:04:22 <gouessej> My RPM works :)
20141026 13:21:21 * rmk0_ is now known as rmk0
20141026 13:21:51 * rmk0 is now known as Guest55795
20141026 13:21:56 <Guest55795> how rude
20141026 13:22:15 * Guest55795 is now known as rmk0_
20141026 13:22:34 * rmk0_ hugs NEWT's auto repeat handling
20141026 13:25:24 <rmk0_> i'm sure everyone here is aware of that 10-15 year old bug in AWT with keyboard repeats
20141026 13:25:39 <rmk0_> basically completely inconsistent behaviour between operating systems
20141026 13:26:05 <rmk0_> love the way i can check a single flag in NEWT and get consistent behaviour everywhere
20141026 13:26:20 <rmk0_> ♥ ♥ ♥
20141026 13:33:28 * kermyt_ (~kermyt@anon) has joined #jogamp
20141026 13:34:12 <zubzub> newt is (very) nice, although I'd like to see it's internal code base a bit more structured/readable
20141026 13:34:40 <zubzub> but then again, making a better windowing framework than awt (or even jfx) isn't *that* hard :p
20141026 13:35:36 <zubzub> I mainly very glad that I don't have to depent on awt or jfx to do opengl operations
20141026 13:39:17 * GTB3NW_ (~GTB3NW@anon) has joined #jogamp
20141026 13:39:51 <gouessej> rmk0: me too :)
20141026 13:39:54 * kermyt (~kermyt@anon) Quit (*.net *.split)
20141026 13:39:55 * GTB3NW (~GTB3NW@anon) Quit (*.net *.split)
20141026 13:39:56 * kermyt_ is now known as kermyt
20141026 13:39:56 * GTB3NW_ is now known as GTB3NW
20141026 14:00:49 * gouessej (5279c0a5@anon) Quit (Ping timeout: 246 seconds)
20141026 14:02:21 * monsieur_max (~maxime@anon) has joined #jogamp
20141026 14:44:31 * rmk0_ is now known as rmk0
20141026 14:44:41 * rmk0 (~rmk0@anon) Quit (Changing host)
20141026 14:44:41 * rmk0 (~rmk0@anon) has joined #jogamp
20141026 14:46:02 <rmk0> i notice that gl.setSwapInterval(..) says that it might not have any effect
20141026 14:46:29 <rmk0> wondering what the canonical, documented way is to get either vsync, or a reliable 60fps refresh rate
20141026 14:46:49 <rmk0> using a 60fps animator, i get 30fps on windows 7
20141026 14:47:01 <rmk0> i get that even if the frame is just a single glClear()
20141026 14:47:07 <rmk0> so... something's off there
20141026 14:50:22 <rmk0> this is NEWT, to be clear
20141026 15:41:24 <sgothel> I saw a 'double vsync' or 'half v-rate' as well .. a while ago .. when I was mis-configuring a monitor on win7 .. hmm
20141026 15:41:58 <sgothel> the new inexpensive Samsung HiDPI thingy .. then I switched on 'turbo' in monitor .. and got the 60hz
20141026 15:42:43 <sgothel> another occurrence could be to have 2 GLDrawables doing vsync .. I forgot which driver, NV or AMD
20141026 15:42:53 <sgothel> (windowed mode)
20141026 15:59:45 <zzuegg> has to be amd, have implemented multicontexts just yesterday and never had a "half rate" issue on NV#
20141026 16:00:14 <zzuegg> the only time i had such an issue was when i was calling display() twice by accident
20141026 16:02:25 <rmk0> in this hello world example, i don't have vsync, just an FPSAnimator
20141026 16:16:45 * Eclesia (~eclesia@anon) Quit (Quit: Leaving.)
20141026 16:36:47 <rmk0> so, er...
20141026 16:38:37 <rmk0> http://fossil.io7m.com/repo.cgi/io7m-jcamera/artifact/a3f71ba4e0479c13f2bcacc034a97959cf44f8ad
20141026 16:39:04 <rmk0> that's the program... is really nothing unusual at all, but the 60 fps FPSAnimator gets 30fps on windows 7
20141026 16:39:11 <rmk0> is on AMD, yes, the catalyst driver
20141026 16:39:27 <rmk0> but as you can see... no vsync, control panel is at the untouched default settings
20141026 16:40:18 <rmk0> the control panel says that vsync is off unless the app asks for it
20141026 16:43:02 <rmk0> would like to get something written up on the wiki about this
20141026 16:43:10 <rmk0> seems like a pretty fundamental issue
20141026 16:43:50 <rmk0> like... "1. ask for vsync. 2. determine whether you actually got vsync. 3. if you didn't get vsync, do xyz to get a reliable 60fps refresh rate" etc
20141026 16:44:55 <rmk0> gl.setSetSwapInterval says that it might not actually give you vsync (i can prevent programs from ever getting vsync in the catalyst control panel, for example) but i'm not sure if there's a way to detect that vsync was or wasn't allowed
20141026 16:51:47 * kermyt (~kermyt@anon) Quit (Ping timeout: 255 seconds)
20141026 16:54:36 * kermyt (~kermyt@anon) has joined #jogamp
20141026 17:27:15 <rmk0> yes... bizarre
20141026 17:27:31 <rmk0> in order to get smooth 60fps, i have to request vsync and then tell the animator to use twice the framerate i actually want
20141026 17:27:43 <rmk0> if i ask for vsync and ask for 60fps, i'll get 30
20141026 17:32:55 <sgothel> which animator, FPSAnimator ?
20141026 17:33:18 <sgothel> pls use Animator
20141026 17:40:52 * monsieur_max (~maxime@anon) Quit (Quit: Leaving.)
20141026 17:54:11 <rmk0> sgothel: FPSAnimator, yeah... will try Animator
20141026 17:58:02 <rmk0> hehe, with Animator, i get a mere 2400fps
20141026 17:58:53 <rmk0> that's ... more sane, at least
20141026 18:29:48 <sgothel> so here .. v-sync shall do it's job properly .. to receive .. err .. v-sync :)
20141026 18:30:12 <sgothel> I was ranting on FPSAnim* a few month ago .. elaborating on this issue
20141026 18:30:24 <rmk0> yeah... i feel like i've had this conversation befor
20141026 18:30:25 <rmk0> e
20141026 18:30:40 <rmk0> i remember you saying "FPSAnimator sucks"
20141026 18:31:43 <sgothel> right .. :)
20141026 18:32:45 <rmk0> ... why does FPSAnimator still exist?
20141026 18:32:57 <rmk0> it seems actively harmful
20141026 18:33:13 <sgothel> we would need to have an API to be notified when the v-sync [irq] happens .. to impl. proper custom [timings] manual
20141026 18:33:27 <sgothel> historically ..
20141026 18:33:41 <sgothel> maybe it was about GLJPanel .. or the like
20141026 18:33:51 <rmk0> hm
20141026 18:34:06 <sgothel> so the current v-sync situation sucks .. altogether .. more or less
20141026 18:34:17 <sgothel> (in general .. not JOGL related)
20141026 18:35:15 <rmk0> it's annoying that there's no reliable way to determine if it's actually enabled or not
20141026 18:35:28 <rmk0> i remember that for a few years it was basically impossible to get it in any form on linux
20141026 18:35:36 <sgothel> right .. getSwapInterval() tries to use proper heuristics ..
20141026 18:35:45 <sgothel> i.e. ES2+ says: enabled by default
20141026 18:35:53 <sgothel> we work accordingly
20141026 18:36:14 <sgothel> if one sets vsync to default: not-enabled, appl. may enable - it usually works well
20141026 18:36:33 <rmk0> yeah, am leaving it at that
20141026 18:36:48 <sgothel> if ES2 etc .. AFAIK we enable vsync by default to be sure and matching the specs
20141026 18:50:01 <rmk0> hm... to be clear: let's assume i don't have vsync and display() is being called thousands of times per second
20141026 18:50:21 <rmk0> for my camera, warping the pointer back to the middle of the screen thousands of times per second means the poor user can't move their mouse quickly enough
20141026 18:50:57 <rmk0> i assume i need to call invoke() on the GLWindow from another thread that's running at a fixed 60fps loop?
20141026 18:51:07 <rmk0> pass it a GLRunnable that warps the pointer back
20141026 18:51:44 <sgothel> well .. then FPSAnim* or a better impl. would be helpful .. yes
20141026 18:52:12 <sgothel> for your integrator .. 10ms interval .. yes
20141026 18:52:22 <sgothel> (or was it 16ms .. )
20141026 18:52:26 <rmk0> well in reality, i'd not tie a physical simulation like a camera to the display rate
20141026 18:52:30 <rmk0> would use a fixed time step
20141026 18:52:51 <sgothel> and you don't need to warp from 'display' ofc
20141026 18:52:52 <rmk0> but there's just that remaining issue of warping the pointer back to the center at a rate that matches my physical simulation
20141026 18:52:58 <rmk0> right
20141026 18:53:21 <rmk0> i was going to do it from another thread, but wasn't sure if warpPointer and the like were thread-safe
20141026 18:53:35 <sgothel> it should be
20141026 18:53:35 <rmk0> eyed the documentation and saw references to invoke(GLRunnable, ...)
20141026 18:54:09 <sgothel> since it looks something (window) .. it will help fluent animation if done from display/anim-thread, yes
20141026 18:54:15 <sgothel> *locks*
20141026 18:54:30 <sgothel> i.e. warp shall not hold back display ..
20141026 18:54:39 <rmk0> right
20141026 18:54:41 <sgothel> so .. its good to be funneled there
20141026 18:54:46 <rmk0> i'll send a runnable
20141026 18:55:28 <sgothel> you also use the 'jailed mouse pointer' ?
20141026 18:55:33 <rmk0> yep
20141026 18:55:36 <sgothel> (confined)
20141026 18:56:13 <rmk0> going to rewrite the example code to do the right thing, rather than do the wrong thing and explain why it's wrong
20141026 19:19:16 * monsieur_max (~maxime@anon) has joined #jogamp
20141026 21:06:15 <zubzub> is there a code example for newt/jogl demonstrating how to correctly do vsync with your own animation loop?
20141026 21:06:35 <zubzub> I thought it was as simple as draw + swap
20141026 21:06:49 <zubzub> but for some reason I get really bad performance
20141026 21:06:57 <zubzub> could be the way I draw as well though
20141026 21:07:02 <zubzub> as I update a texture on each draw cycle
20141026 21:07:04 <sgothel> yes .. as simple .. and as insufficient due to lack of definition ..
20141026 21:08:01 <sgothel> i.e. issue starts w/ multiple drawables/context .. each in its window - NV has an extension 'swap group' .. but not impl. in general or on consumer cards
20141026 21:08:14 <zubzub> what I want to do is render/update a texture on a quad each cycle and sync the drawing to vblank
20141026 21:08:15 <sgothel> how do you update a texture? FBO ?
20141026 21:08:47 <zubzub> errr no I don't think so
20141026 21:08:49 <zubzub> lemme see
20141026 21:08:56 <zubzub> (my ide just crashed)
20141026 21:09:29 <zubzub> gltextimage2d
20141026 21:09:33 <zubzub> -t
20141026 21:09:37 <sgothel> well .. in general, yes - swap does v-sync if enabled. mind GLAutoDrawable has auto-swap enabled by default
20141026 21:09:54 <zubzub> basically this: https://open.gl/textures
20141026 21:10:06 <zubzub> I also have the impression I'm memory leaking
20141026 21:10:12 <zubzub> cfr my ide crash
20141026 21:10:35 <zubzub> I guess glteximage2d is very bad for updating texture data?
20141026 21:10:56 <sgothel> glTexSubImage2D <- slightly better
20141026 21:11:35 <sgothel> i.e. preserves internal buffers ..
20141026 21:12:10 <sgothel> then .. you could update the texture off-thread .. and use multiple ones guaranteeing non-locking operation (i.e. RingBuffer)
20141026 21:12:20 <sgothel> via a shared context
20141026 21:12:58 <sgothel> http://forum.jogamp.org/Best-way-to-prepare-an-Image-td4031731.html#a4031732
20141026 21:12:59 <zubzub> too comlex for my limited opengl knowledge
20141026 21:13:00 <zubzub> for now
20141026 21:13:18 <zubzub> for some reason my rendering performance is like 1-2 fps
20141026 21:13:25 <sgothel> its more generic .. not really OpenGL related
20141026 21:13:33 <zubzub> but I guess it's probably non gl related
20141026 21:13:41 <sgothel> if no DMA is being used for text uploads ..
20141026 21:14:08 <sgothel> you could also use PBO (pixel buffer objects) for uploads, using DMA
20141026 21:14:19 <zubzub> yeah I saw some references regarding that
20141026 21:14:47 <sgothel> but all this only makes sense if doing it off-thread w/ a few textures / n-buffering, if you like to call it
20141026 21:14:52 <sgothel> and non locking ofc
20141026 21:14:57 <sgothel> non blocking
20141026 21:15:39 <zubzub> I think I'm going to extend my texture rending poc and make it render lot's of updates to find out what I'm doing wrong
20141026 21:15:44 <sgothel> well .. apart from the PBO, its what we do in GLMediaPlayerImpl.StreamWorker .. and GraphUI for one GLEventListener button
20141026 21:16:04 <zubzub> ok I'll have a look
20141026 21:52:25 * monsieur_max (~maxime@anon) Quit (Quit: Leaving.)
20141027 05:06:25 -jogamp- Continue @ http://jogamp.org/log/irc/jogamp_20141027050625.html