#jogamp @ irc.freenode.net - 20160427 05:06:19 (UTC)


20160427 05:06:19 -jogamp- Previous @ http://jogamp.org/log/irc/jogamp_20160426050619.html
20160427 05:06:19 -jogamp- This channel is logged @ http://jogamp.org/log/irc/jogamp_20160427050619.html
20160427 06:03:28 * bigpet (uid25664@anon) has joined #jogamp
20160427 06:23:56 * elect (~GBarbieri@anon) has joined #jogamp
20160427 06:28:57 <elect> hi
20160427 06:31:01 * elect (~GBarbieri@anon) Quit (Read error: Connection reset by peer)
20160427 07:05:18 * elect (~GBarbieri@anon) has joined #jogamp
20160427 07:30:56 * monsieur_max (~maxime@anon) has joined #jogamp
20160427 07:31:21 <monsieur_max> hi
20160427 07:33:52 * Eclesia (~husky@anon) has joined #jogamp
20160427 07:34:19 <elect> hey
20160427 07:34:30 <Eclesia> hi
20160427 07:34:46 <monsieur_max> the 3 musketeers
20160427 07:36:33 <elect> who are you?
20160427 07:37:12 <Eclesia> portos :D
20160427 07:37:39 <monsieur_max> :(
20160427 07:37:40 <elect> \o/
20160427 07:40:06 <Eclesia> he's got a nice mustache ;)
20160427 07:40:41 <monsieur_max> and a nice appetite ...
20160427 07:41:20 <Eclesia> french -> food
20160427 07:41:31 <Eclesia> logic choice ^^
20160427 08:31:06 * jvanek (jvanek@anon) has joined #jogamp
20160427 08:38:45 <elect> if you interested, C vs Java
20160427 08:38:45 <elect> https://github.com/elect86/glTest/blob/master/README.md
20160427 09:21:02 <Eclesia> so C IS faster, it's not a troll after all
20160427 09:29:01 <elect> yep, but not that much
20160427 09:35:32 <Eclesia> sometimes it's x2/x3
20160427 09:36:02 <bruce-> i'd rather lose some fps than gain the hypertension that comes from working with C (and its tools)
20160427 09:38:13 <elect> don't look the bindless, it has a bug
20160427 09:38:51 <elect> also the streaming, we pay an high penalty
20160427 09:39:23 <rmk0> i haven't read the code, where is the streaming performance penalty?
20160427 09:39:53 <bruce-> CPU time: 444 ms, GPU time: 455 ms, theor. FPS: 2,194
20160427 09:39:54 <bruce-> CPU time: 148 ms, GPU time: 458 ms, theor. FPS: 2,18
20160427 09:40:02 <bruce-> for GLBufferSubData
20160427 09:40:15 <bruce-> are you sure those CPU timings for C are OK?
20160427 09:55:07 <elect> that troubles me too
20160427 09:55:14 <elect> I remember at begin that was 400 something too
20160427 09:55:23 <elect> but no way, I get now that
20160427 09:55:34 <elect> maybe I should note that
20160427 09:56:29 <elect> CPU time: 339,864 ms, GPU time: 471,186 ms, theor. FPS: 2,12
20160427 09:56:29 <elect> CPU time: 262,684 ms, GPU time: 459,063 ms, theor. FPS: 2,18
20160427 09:56:29 <elect> CPU time: 186,875 ms, GPU time: 457,928 ms, theor. FPS: 2,18
20160427 09:56:29 <elect> CPU time: 160,488 ms, GPU time: 458,268 ms, theor. FPS: 2,18
20160427 09:56:29 <elect> CPU time: 159,294 ms, GPU time: 458,288 ms, theor. FPS: 2,18
20160427 09:56:30 <elect> CPU time: 160,321 ms, GPU time: 458,193 ms, theor. FPS: 2,18
20160427 09:56:37 <elect> warming bring that down
20160427 09:56:53 <elect> but I think it's wrong
20160427 09:57:00 <elect> anywa
20160427 09:57:00 <elect> y
20160427 09:57:29 <elect> this is how I measure cpu
20160427 09:57:30 <elect> https://github.com/elect86/glTest/blob/master/glTest/src/glTest/framework/ApplicationState.java#L188-L194
20160427 09:58:03 <elect> anyway, the C timings are fine
20160427 09:58:07 <elect> I guess the java are wrong
20160427 09:59:40 <elect> this on C
20160427 09:59:40 <elect> https://github.com/elect86/apitest/blob/master/src/framework/apitest.cpp#L145-L159
20160427 09:59:53 <rmk0> elect: you're on windows?
20160427 10:00:02 <elect> yep
20160427 10:00:57 <rmk0> https://io7m.github.io/timehack6435126/
20160427 10:01:00 <rmk0> you might want that
20160427 10:01:50 <rmk0> https://github.com/io7m/timehack6435126/blob/master/io7m-timehack6435126-core/src/main/java/com/io7m/timehack6435126/TimeHack6435126.java
20160427 10:01:55 <rmk0> such a stupid problem
20160427 10:09:16 <elect> what's the difference?
20160427 10:10:13 <rmk0> you might be getting low resolution timers on the jvm on windows by default
20160427 10:10:20 <rmk0> will cause inaccurate measurements
20160427 10:12:15 <elect> so, just a TimeHack6435126.enableHighResolutionTimer() and I am good to go?
20160427 10:12:36 <rmk0> yeah
20160427 10:15:53 <elect> is this link supposed to be relatively permanent?
20160427 10:15:53 <elect> https://io7m.github.io/timehack6435126/
20160427 10:16:03 <elect> coz then Iam gonna reference it
20160427 10:16:15 <rmk0> yeah
20160427 10:17:14 <rmk0> you may find it makes no difference whatsoever
20160427 10:18:18 <elect> CPU time: 388,099 ms, GPU time: 473,349 ms, theor. FPS: 2,11
20160427 10:18:18 <elect> CPU time: 324,838 ms, GPU time: 460,180 ms, theor. FPS: 2,17
20160427 10:18:18 <elect> CPU time: 273,472 ms, GPU time: 460,223 ms, theor. FPS: 2,17
20160427 10:18:18 <elect> CPU time: 254,974 ms, GPU time: 460,185 ms, theor. FPS: 2,17
20160427 10:18:18 <elect> CPU time: 254,282 ms, GPU time: 460,677 ms, theor. FPS: 2,17
20160427 10:18:19 <elect> CPU time: 255,498 ms, GPU time: 460,574 ms, theor. FPS: 2,17
20160427 10:18:21 <elect> CPU time: 255,259 ms, GPU time: 460,468 ms, theor. FPS: 2,17
20160427 10:18:23 <elect> CPU time: 255,685 ms, GPU time: 460,553 ms, theor. FPS: 2,17
20160427 10:18:25 <elect> CPU time: 256,737 ms, GPU time: 461,610 ms, theor. FPS: 2,17
20160427 10:18:27 <elect> CPU time: 256,016 ms, GPU time: 461,403 ms, theor. FPS: 2,17
20160427 10:26:21 <rmk0> Eclesia: http://io7m.com/publicdomain/timehack6435126.asc \o/
20160427 10:33:28 <Eclesia> rmk0: a hack to correctly measure time ?
20160427 10:39:51 <rmk0> a hack to turn on the sometimes-off-by-default high res timers in the jvm
20160427 10:40:01 <elect> in rmk0 we trust
20160427 10:40:14 <rmk0> the jvm has a command line switch to turn them on, but thanks to some stupid bug, the command line switch actually forces them to always be off
20160427 10:40:35 <rmk0> need to use that workaround above to unconditionally turn them on >_<
20160427 10:41:35 <elect> let's re-run all the shits
20160427 10:42:21 <elect> no wait
20160427 10:42:21 <elect> CPU time: 361,103 ms, GPU time: 498,131 ms, theor. FPS: 2,01
20160427 10:42:21 <elect> CPU time: 254,356 ms, GPU time: 459,179 ms, theor. FPS: 2,18
20160427 10:42:21 <elect> CPU time: 176,427 ms, GPU time: 458,672 ms, theor. FPS: 2,18
20160427 10:42:21 <elect> CPU time: 149,036 ms, GPU time: 458,654 ms, theor. FPS: 2,18
20160427 10:42:22 <elect> CPU time: 147,619 ms, GPU time: 458,583 ms, theor. FPS: 2,18
20160427 10:42:24 <elect> CPU time: 148,782 ms, GPU time: 457,895 ms, theor. FPS: 2,18
20160427 10:42:26 <elect> CPU time: 148,662 ms, GPU time: 457,442 ms, theor. FPS: 2,19
20160427 10:42:28 <elect> CPU time: 148,511 ms, GPU time: 457,428 ms, theor. FPS: 2,19
20160427 10:42:30 <elect> CPU time: 148,601 ms, GPU time: 457,343 ms, theor. FPS: 2,19
20160427 10:42:32 <elect> CPU time: 148,381 ms, GPU time: 457,376 ms, theor. FPS: 2,19
20160427 10:42:34 <elect> it's the browser
20160427 10:42:38 <elect> afa it is open
20160427 10:42:42 <elect> it sucks my cpu for java
20160427 10:44:28 <elect> brb
20160427 11:09:42 <elect> how can I make the glcontex current?
20160427 11:10:23 <elect> I want to execute this from the key listener withouth passing throught the display()
20160427 11:10:23 <elect> GLContext.getCurrent().makeCurrent();
20160427 11:10:23 <elect> GL3 gl3 = GLContext.getCurrentGL().getGL3();
20160427 11:10:23 <elect> gl3.glDisable(GL_DEPTH_CLAMP);
20160427 11:10:32 <elect> but getCurrent() is null
20160427 11:13:59 <rmk0> getCurrent() being null means that there isn't a context that's current on the current thread
20160427 11:14:22 <rmk0> so you need to get a reference to the context you intend to make current some other way
20160427 11:16:31 <elect> how?
20160427 11:17:17 <rmk0> how are you creating a context in the first place?
20160427 11:17:30 <rmk0> presumably you're opening a GLWindow somewhere?
20160427 11:18:01 <rmk0> you can retrieve the context from the GLWindow after it's been made visible for the first time
20160427 11:18:06 <elect> yes
20160427 11:18:12 <elect> ok
20160427 11:19:30 <elect> cool
20160427 11:19:31 <elect> glWindow.getContext().makeCurrent();
20160427 11:19:31 <elect> GL3 gl3 = GLContext.getCurrentGL().getGL3();
20160427 11:19:31 <elect> gl3.glDisable(GL_DEPTH_CLAMP);
20160427 11:19:31 <elect> glWindow.getContext().release();
20160427 11:19:47 <elect> I also need to release, otherwise it will be stuck on the input listener
20160427 11:19:55 <elect> thanks rmk0
20160427 11:20:07 <rmk0> yeah
20160427 11:20:28 <rmk0> i seem to remember that it's important to release() exactly as many times as you've made current
20160427 11:20:38 <rmk0> can run into problems on some drivers if you don't
20160427 11:21:50 <elect> noted
20160427 11:21:51 <elect> thanks
20160427 11:22:01 <elect> you remember which drivers?
20160427 11:24:34 <rmk0> these old AMD drivers (catalyst 13) on windows 7 will do it
20160427 11:24:42 <rmk0> get WGLExceptions at various times
20160427 11:41:34 <guillaum1> hi there
20160427 11:42:13 <guillaum1> it seems that gluegen doesn't support enum in a struct
20160427 11:45:03 <zubzub> there are a lot of things gluegen doesn't support ;)
20160427 11:46:22 <bruce-> ah, binding talk. I was just looking into making bindings for Canon EDSDK. There is edsdk4j but that only works on Windows (I am on OSX mostly)
20160427 11:46:55 <bruce-> it is using JNA and JNAerator
20160427 11:47:17 <bruce-> should I bother getting that to work on OSX or is using something else than JNA a wise choice?
20160427 11:47:26 <zubzub> JNA should work on osx no?
20160427 11:48:02 <zubzub> JNA is about the most stable/widely supported non-jni solution I can think of
20160427 11:49:04 <zubzub> if you want speed and only run on linux I can recommend my own sollution :p
20160427 11:50:19 <bruce-> When I read https://github.com/kritzikratzi/edsdk4j/wiki I am not exactly sure what is going on
20160427 11:52:58 <zubzub> I don't get why he implies it doesn't work on other platforms
20160427 11:53:09 <zubzub> as long as you have the native lib for the platform
20160427 11:53:15 <zubzub> it should work
20160427 11:53:27 <zubzub> unless the native lib uses some very platform specific concepts in its api
20160427 11:53:42 <zubzub> in which case it wouldnt be possible to compile it for the target OS anyway
20160427 11:59:09 * guillaum1 is gonna try jnr-ffi ( http://www.oracle.com/technetwork/java/jvmls2013nutter-2013526.pdf )
20160427 12:00:30 <bruce-> zubzub: alright, any thoughts on JNAerator?
20160427 12:05:09 <zubzub> bruce-: it's a horribly written tool that does a relatively ok job
20160427 12:05:42 <zubzub> don't expect that code that comes out to be ok, but you should be able to get it going with some minor corrections
20160427 12:06:02 <zubzub> guillaum1: jnr is basically jna 2.0
20160427 12:06:23 <zubzub> figuartively speaking
20160427 12:06:38 <bruce-> ah ok
20160427 12:06:43 <zubzub> (as jna is version 4.x or something ;p)
20160427 12:06:55 <zubzub> jna second gen.
20160427 12:07:32 <guillaum1> zubzub: ok didn't know that. Thanks
20160427 12:07:32 <bruce-> is there anything similar to JNAerator that would work better?
20160427 12:16:58 <rmk0> that jnr-ffi thing looks decent, didn't know it existed
20160427 12:17:43 <monsieur_max> nice to see that i'm not the only one with that issue ... https://github.com/jinput/jinput/issues/8
20160427 12:29:10 <monsieur_max> ok guys, I've got a tricky issue with native loading ( tricky for me ). With my game, on linux, i provide the ffmpeg libs with the right version. Those libs are a bit older than the one people have already installed on their machine, but they are needed as FfmpegMediaPlayer is not working with latest version of ffmpeg. My issue is that even if i force a System.load() for them, as well as putting the library folder in the PATH before l
20160427 12:30:02 <rmk0> monsieur_max: message truncated at "...folder in the PATH before l"
20160427 12:30:13 <monsieur_max> damn
20160427 12:30:20 <monsieur_max> My issue is that even if i force a System.load() for them, as well as putting the library folder in the PATH before launch, theGlMediaPlayer seems always to favor the libs installed on the machine.
20160427 12:31:02 <monsieur_max> so basically, let's say that i provided libavformat.56, and in the logs, i see the player trying to use libavformat.57 and fail
20160427 12:31:58 <monsieur_max> the player managed to find all the libs using ***.so and not specified version like ***.##.so
20160427 12:33:56 <monsieur_max> so, question, by java code or bash, is there a way to solve this ? ie make the player favors my libs rather than the system one ?
20160427 12:41:38 <rmk0> monsieur_max: is it possible to completely wipe the library path after the libGL.* nonsense has been loaded?
20160427 12:46:06 <monsieur_max> don't know, i'm not a very good programmer nor linux user
20160427 13:25:02 * jvanek (jvanek@anon) Quit (Ping timeout: 260 seconds)
20160427 13:55:06 * jvanek (jvanek@anon) has joined #jogamp
20160427 14:59:35 <monsieur_max> no idea ? ;)
20160427 15:01:47 <zubzub> monsieur_max: you can load the library yourself directly from a path
20160427 15:02:04 <monsieur_max> that's what i do with a System.load()
20160427 15:02:40 <monsieur_max> but jogamp's ffmpegplayer does not care and load them differently
20160427 15:02:44 <zubzub> ok so the problem is afaiu that you have a shared library (jni?) that links to the wrong library?
20160427 15:03:44 <monsieur_max> mmh not exactly, i provide my own ffmpeg shared libs in a lib folder, load them with a System.load
20160427 15:04:12 <zubzub> because another library is supposed to use it right?
20160427 15:04:12 <monsieur_max> when jogamp media player is intanciated, a lookup is made on the system to find those SO
20160427 15:04:18 <zubzub> yes
20160427 15:04:21 <zubzub> and it finds the sytem libs
20160427 15:04:23 <zubzub> and not yours
20160427 15:04:27 <monsieur_max> yup
20160427 15:04:52 <zubzub> ok, and it should work cross platform?
20160427 15:04:55 <zubzub> or just linux?
20160427 15:05:05 <monsieur_max> well, on windows, it works
20160427 15:05:11 <monsieur_max> on mac, it seems to work fine too
20160427 15:05:19 <zubzub> ok
20160427 15:05:24 <zubzub> try to use LD_PRELOAD in linux
20160427 15:05:34 <zubzub> this will but the symbols in loaded memory
20160427 15:05:38 <monsieur_max> it's a bash command ?
20160427 15:05:47 <zubzub> http://stackoverflow.com/questions/426230/what-is-the-ld-preload-trick
20160427 15:06:11 <monsieur_max> zubzub: nice :)
20160427 15:06:20 <zubzub> it will load the lib before any other libs of the program
20160427 15:06:35 <monsieur_max> thanks, I'll give it a try
20160427 15:06:40 <zubzub> so it will populate your shared libs memory in linux with the symbols of your version
20160427 15:07:04 <zubzub> so when the symbols are resolved of your program (the ffmpeg player?) it will find the ones that are already in memory
20160427 15:07:11 <zubzub> and use those
20160427 15:07:31 <monsieur_max> good good, I hope it'll work
20160427 15:07:54 <zubzub> it should work, if not there is something incompatible/wrong with your version lib & the version the player expects
20160427 15:08:12 <monsieur_max> no, that's the very point of providing them :)
20160427 15:08:34 <rmk0> the ffmpeg API and ABI are all over the place, always have been
20160427 15:08:42 <rmk0> really unfortunate
20160427 15:09:09 <monsieur_max> yeah, but the problem is that new versions of ffmpeg are available on distros, and the ffmpegplayer is not yet aligned
20160427 15:09:25 <monsieur_max> f.e, it has always worked on my computer, without providing them
20160427 15:09:37 <monsieur_max> but on more up-to-date distro, it's failing
20160427 15:13:50 <monsieur_max> ( https://github.com/sgothel/jogl/blob/master/src/jogl/classes/jogamp/opengl/util/av/impl/FFMPEGMediaPlayer.java )
20160427 15:14:10 <monsieur_max> line 114
20160427 15:14:35 <zubzub> that's why you usually want to statically link
20160427 15:20:12 <monsieur_max> not sure to understand what does that mean :)
20160427 16:00:07 * monsieur_max (~maxime@anon) Quit (Quit: Leaving.)
20160427 16:05:15 * Eclesia (~husky@anon) has left #jogamp
20160427 17:03:19 * elect (~GBarbieri@anon) Quit (Ping timeout: 244 seconds)
20160427 17:19:56 * monsieur_max (~maxime@anon) has joined #jogamp
20160427 17:27:34 * Eclesia (~eclesia@anon) has joined #jogamp
20160427 17:35:13 * jvanek (jvanek@anon) Quit (Quit: Leaving)
20160427 17:35:15 <Eclesia> rmk0: the pgp signature you made, I believe that was a subtile way to allow me to add it to unlicense-lib. is it ok with you if I add it with the others in : https://bitbucket.org/Eclesia/unlicense/src/tip/contribution/ ?
20160427 17:36:34 <Eclesia> (I already have one of yours, so I guess it's ok ^^)
20160427 17:36:45 <rmk0> Eclesia: yes, is fine. it's supposed to satisfy legal requirements in that i can show i actually did dedicate something to the public domain
20160427 17:36:52 <rmk0> unless some devious person has my private key
20160427 17:42:21 <Eclesia> a complete project and doc for a few lines of code ^^
20160427 17:43:12 <rmk0> /o\
20160427 17:44:21 <Eclesia> don't you have somekind of utility lib of your own for such small codes ?
20160427 17:45:55 <rmk0> no, i think it's poor engineering. those kind of libraries grow and grow and grow, and can't have well-versioned APIs (you make a breaking change in one unrelated API and now the whole package is backwards-incompatible, even though 99% of the other APIs didn't change)
20160427 17:47:09 <rmk0> prefer to keep each thing as separate, small, and specialized as possible
20160427 17:47:53 <Eclesia> one lib can have many modules
20160427 17:50:19 <rmk0> they can, but i see no benefit to mashing together functionally disparate things into one giant pile
20160427 17:54:05 <Eclesia> rmk0: code added, thanks again :)
20160427 17:54:21 <rmk0> \o/
20160427 17:54:33 <Eclesia> https://bitbucket.org/Eclesia/unlicense/commits/d31207cbb0248111c4cb404083c281e355ea23b4
20160427 17:57:01 <Eclesia> rmk0: maybe not at the beginning, but with time the more you add, the more you can reuse. that's the way unlicense-lib started too. I have some sparsed code for pmd decoder (made for ardor 3d), some grammar lexer (for parrot vm), .... by filling the gaps, well it makes a full lib :)
20160427 20:02:51 * Eclesia *pom pom pom*
20160427 20:04:24 <rmk0> *BLAM*
20160427 20:34:11 * monsieur_max (~maxime@anon) Quit (Quit: Leaving.)
20160427 21:11:37 * Eclesia (~eclesia@anon) Quit (Quit: Leaving.)
20160427 21:32:44 * bigpet (uid25664@anon) Quit (Quit: Connection closed for inactivity)
20160428 05:06:19 -jogamp- Continue @ http://jogamp.org/log/irc/jogamp_20160428050619.html