#jogamp @ irc.freenode.net - 20160215 05:05:28 (UTC)


20160215 05:05:28 -jogamp- Previous @ http://jogamp.org/log/irc/jogamp_20160214050528.html
20160215 05:05:28 -jogamp- This channel is logged @ http://jogamp.org/log/irc/jogamp_20160215050528.html
20160215 07:23:01 * elect (~GBarbieri@anon) has joined #jogamp
20160215 08:20:51 * monsieur_max (~maxime@anon) has joined #jogamp
20160215 08:58:28 * jvanek (jvanek@anon) has joined #jogamp
20160215 09:01:33 * jvanek (jvanek@anon) Quit (Remote host closed the connection)
20160215 09:03:20 * jvanek (jvanek@anon) has joined #jogamp
20160215 09:17:08 * jvanek (jvanek@anon) Quit (Changing host)
20160215 09:17:08 * jvanek (jvanek@anon) has joined #jogamp
20160215 10:51:27 * Eclesia (~husky@anon) has joined #jogamp
20160215 10:51:36 <Eclesia> o/
20160215 11:53:36 * xranby (~xranby@anon) has joined #jogamp
20160215 13:32:56 <Eclesia> question : how does opengl behave when there is a difference between declared outputs in the shader program and the fbo attachment (difference not by format but with missing attachment or missing declared out layout) ?
20160215 13:34:58 <rmk0> Eclesia: remember that an fbo has color attachments, and each color attachment is associated with exactly one draw buffer. if a draw buffer is associated with an attachment that doesn't actually exist, then the framebuffer is incomplete. if an attachment exists but the associated draw buffer is GL_NONE, then the output from the fragment shader that's written to that draw buffer just doesn't go anywhere
20160215 13:35:04 <rmk0> clear as mud
20160215 13:35:52 <rmk0> if the fragment shader declares fewer outputs than there are draw buffers... i'm not sure what happens. at the least i'd expect the associated color attachments to be untouched
20160215 13:37:09 <monsieur_max> Eclesia: see? you made him angry again :( don't mention openGL here
20160215 13:37:10 <Eclesia> that's what I hope
20160215 13:37:36 <rmk0> i'm not angry... (._.)
20160215 13:37:41 <rmk0> i'm just saying what it does!
20160215 13:38:03 <monsieur_max> ;)
20160215 13:38:12 <rmk0> the framebuffer things can be confusing, though. i'm not really sure why they made the concept of draw buffers and framebuffer color attachments separate
20160215 13:38:13 <Eclesia> angry ? about what ?
20160215 13:39:07 <monsieur_max> Eclesia: rmk0 is kinda .... bitter against openGL
20160215 13:39:13 <monsieur_max> that was a joke ...
20160215 13:39:29 <rmk0> /(._.)\
20160215 13:39:48 <Eclesia> impossible ! OpenGL is perfection !
20160215 13:39:48 * monsieur_max resigns
20160215 13:39:52 <rmk0> hehe
20160215 13:57:40 * xranby is trying to solve what to do when the user have two opengl drivers installed on the same system
20160215 13:57:50 <zubzub> oh it's xranby
20160215 13:57:54 <xranby> hi
20160215 13:57:54 <Eclesia> :o
20160215 13:58:03 <rmk0> ello
20160215 13:58:06 <zubzub> xranby: LD_PRELOAD
20160215 13:58:16 <xranby> raspberry pi raspbian distribution decided to roll out a new release
20160215 13:58:30 <monsieur_max> yay, opengl drivers ;)
20160215 13:58:33 <zubzub> that will tell ld to pick up which gl implementation
20160215 13:58:38 <xranby> and this new release ships with both the mesa3d and broadcoms drivers
20160215 13:58:50 <zubzub> I had the same problem on the pi
20160215 13:58:57 <xranby> causing a major... let me find the apropriate word..
20160215 13:59:01 <xranby> clusterfuck!
20160215 13:59:10 <monsieur_max> you mean "fun" ?
20160215 13:59:14 <xranby> yes fun
20160215 13:59:18 <xranby> much fun
20160215 13:59:39 <xranby> zubzub: the best thing is if a system only expose one driver at a time
20160215 13:59:49 <xranby> ... jogl dynamically links globally
20160215 13:59:59 <zubzub> ah yes jogl
20160215 14:00:03 <zubzub> I didn't use jogl
20160215 14:00:18 <zubzub> and wrote my own (quick) bindings to the gl api
20160215 14:00:18 <xranby> thus you need to A) rewrite JOGL to not link globally
20160215 14:00:39 <xranby> B) persuade raspbian to only expose one set of drivers at a time
20160215 14:00:43 <xranby> C) ????
20160215 14:00:53 <xranby> in the end profit!
20160215 14:00:57 <zubzub> how does jogl link globally?
20160215 14:01:03 * jvanek (jvanek@anon) Quit (Quit: Leaving)
20160215 14:01:09 <zubzub> I think A is actually the best solution
20160215 14:01:45 <zubzub> forcing a system to only have a signle implementation is not very good
20160215 14:01:49 <zubzub> nor common
20160215 14:01:57 <zubzub> ofter you have a mesa and a factory implementation
20160215 14:02:20 <rmk0> how does lwjgl handle this nowadays?
20160215 14:02:26 <rmk0> i see they recently had a rewrite
20160215 14:02:29 <xranby> lwjgl do not handle it
20160215 14:02:41 <rmk0> that... sounds like lwjgl
20160215 14:03:22 <xranby> rmk0: lwjgl uses a glfw3 http://www.glfw.org/documentation.html
20160215 14:03:38 <rmk0> ah, right. saw they'd added that as a backend
20160215 14:04:02 * jvanek (jvanek@anon) has joined #jogamp
20160215 14:04:26 <xranby> glfw3 do not handle opengl es http://www.glfw.org/faq.html#what-versions-of-opengl-are-supported-by-glfw
20160215 14:04:44 <zubzub> GLFW now has an experimental Wayland display protocol backend that can be selected on Linux with a CMake option.
20160215 14:04:59 <zubzub> looks like jogl is behind then :p
20160215 14:05:09 <monsieur_max> *taunt*
20160215 14:05:13 <rmk0> is a shame that we can't go back in time and make opengl behave like opencl's platform and device abstraction
20160215 14:05:58 <xranby> in any case... jogl looks up each opengl symbol one at a time using a library handle https://jogamp.org/deployment/v2.3.2/javadoc/gluegen/javadoc/com/jogamp/common/os/DynamicLinker.html#lookupSymbol%28long,%20java.lang.String%29
20160215 14:06:14 <xranby> this lookupSymbol looks system wide
20160215 14:06:44 <xranby> the good thing about doing it this way is that we can be sure that the opengl driver supports what it claims it support
20160215 14:07:16 <zubzub> http://linux.die.net/man/3/dlsym
20160215 14:07:20 <zubzub> so it's basically that
20160215 14:07:25 <xranby> yes
20160215 14:07:36 <xranby> on linux gluegen uses ldsym
20160215 14:08:02 <xranby> with https://jogamp.org/deployment/v2.3.2/javadoc/gluegen/javadoc/com/jogamp/common/os/DynamicLinker.html#lookupSymbol%28long,%20java.lang.String%29
20160215 14:08:06 <xranby> RTLD_GLOBAL
20160215 14:08:26 <zubzub> dlsym will only look at symbols of dlopened libs
20160215 14:08:50 <zubzub> solution, don't dlopen the library :)
20160215 14:09:20 <zubzub> If filename is a NULL pointer, then the returned handle is for the main program. When given to dlsym(), this handle causes a search for a symbol in the main program, followed by all shared libraries loaded at program startup, and then all shared libraries loaded by dlopen() with the flag RTLD_GLOBAL.
20160215 14:09:34 <xranby> the problem is that when we dlopen libegl and then dlopen libgles2
20160215 14:09:45 <xranby> we get libegl from mesa3d and libgles2 from broadcom
20160215 14:09:50 <xranby> and this do not work
20160215 14:09:57 <rmk0> /o\
20160215 14:10:34 <xranby> thus we must make sure that we load the matching second part from a library at a location close to the first one
20160215 14:10:38 <xranby> crazy code
20160215 14:10:48 <zubzub> s/crazy/bad assumption ;)
20160215 14:11:02 <xranby> else we run into issues causing crashes and whatnot
20160215 14:11:19 <xranby> because broadcoms' libegl is not designed to work with mesa3d opengles 2 and vice versa
20160215 14:11:47 <xranby> i have not seen any opengl loader code solve this up to date
20160215 14:11:54 <xranby> only ahead of time statically linking work
20160215 14:11:58 <xranby> and LD_PRELOAD
20160215 14:12:13 <rmk0> sadness
20160215 14:12:15 <xranby> on such messed up systems
20160215 14:12:34 <zubzub> or don't start loading globally and pass on the libs that should be resolved first to ld
20160215 14:12:36 <xranby> so yeah.. need to fix this
20160215 14:12:56 <zubzub> or dlopen the sane libs first yourself
20160215 14:13:21 <xranby> i think it is valid to say that this is an illegal way to install opengl drivers :)
20160215 14:14:09 <zubzub> make sure they ar enot installed in a path searched by ld
20160215 14:14:17 <zubzub> and use a symolink to switch between them
20160215 14:14:33 <zubzub> afaik that's how gentoo handles it
20160215 14:15:52 <zubzub> eselect opengl set <gl implementation>
20160215 14:16:16 <zubzub> looks like raspbian then enables both at the same time
20160215 14:16:42 <zubzub> they should have something like update-alternative for the gl implementation
20160215 14:20:11 <zubzub> anyway xranby I managed to cross compile openjdk8 in a docker container!
20160215 14:20:19 <zubzub> only took me an entire week to get it properly figuerd out
20160215 14:32:31 <xranby> zubzub: hurray!
20160215 14:33:10 <xranby> zubzub: yes rasbian should have used the system update alternatives system to solve it.. however they have not done so
20160215 14:33:32 <xranby> mostly because the broadcom driver is not compatible with x11
20160215 14:33:41 <xranby> thus they cans use it as an alternative
20160215 14:33:45 <xranby> cant
20160215 14:33:55 <xranby> instead they decided to ship both drivers
20160215 14:34:01 <xranby> one that is compatible with x11
20160215 14:34:10 <xranby> and one that only work with broadcoms dispmanx api
20160215 14:34:45 <xranby> we have tested both drivers separately
20160215 14:35:01 <xranby> for more than a year now
20160215 14:35:20 <xranby> didnt think that anyone would be silly to install them both into the same system
20160215 14:35:25 <xranby> .. well they did
20160215 14:36:56 <zubzub> 15:33 < xranby> mostly because the broadcom driver is not compatible with x11
20160215 14:36:57 <zubzub> ouch
20160215 14:37:05 <zubzub> what a bad reasoning
20160215 14:37:07 <elect> Eclesia, you may also have attachmentless fbos
20160215 14:37:56 <xranby> zubzub: best fix atm is to rm -r /opt/vc/lib
20160215 14:38:04 <elect> https://github.com/elect86/jogl-samples/blob/master/jogl-samples/src/tests/gl_430/Gl_430_fbo_without_attachment.java
20160215 14:38:08 <xranby> and remove the broadcom driver and only use the freesoftware driver
20160215 14:38:31 <xranby> however that is kind of evil to do :)
20160215 14:39:20 <xranby> gluegen if you detect the raspberry pi broadcom driver and mesa3d at the same time then nuke the broadcom driver
20160215 14:39:40 <xranby> ok tnx bye
20160215 15:20:34 * jvanek (jvanek@anon) Quit (Quit: Leaving)
20160215 16:52:23 * monsieur_max (~maxime@anon) Quit (Quit: Leaving.)
20160215 17:21:15 * Eclesia (~husky@anon) has left #jogamp
20160215 17:37:21 * monsieur_max (~maxime@anon) has joined #jogamp
20160215 18:36:28 * elect (~GBarbieri@anon) Quit (Ping timeout: 250 seconds)
20160215 21:20:33 * monsieur_max (~maxime@anon) Quit (Quit: Leaving.)
20160215 21:56:28 * philjord (599cc172@anon) has joined #jogamp
20160215 23:20:22 * philjord (599cc172@anon) Quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
20160216 05:05:28 -jogamp- Continue @ http://jogamp.org/log/irc/jogamp_20160216050528.html