#jogamp @ irc.freenode.net - 20131004 05:05:31 (UTC)


20131004 05:05:31 -jogamp- Previous @ http://jogamp.org/log/irc/jogamp_20131003050530.html
20131004 05:05:31 -jogamp- This channel is logged @ http://jogamp.org/log/irc/jogamp_20131004050531.html
20131004 07:22:27 <sgothel> maven 2.1.0-rc-20131003 ; http://jogamp.org/deployment/archive/master/gluegen_725-joal_483-jogl_1097-jocl_853/ ; http://jogamp.org/deployment/archive/master/gluegen_725-joal_483-jogl_1097-jocl_853-signed/
20131004 07:32:47 * monsieur_max (~maxime@anon) has joined #jogamp
20131004 07:53:46 * xranby-64 (~familjen@anon) Quit (Ping timeout: 245 seconds)
20131004 10:44:35 <monsieur_max> xranby: got the same native error under windows + amd, where yesterday it was on linux + nvidia, so therea re good chances that it's my fault
20131004 10:50:37 <monsieur_max> i'm trying to find where the source code of the demo are, for the latest autobuilds
20131004 10:50:59 <xranby> the junit test demos are located inside the jogl git
20131004 10:51:37 <xranby> this include all demo's shown at: http://jogamp.org/deployment/jogamp-current/jogl-test-applets.html
20131004 10:51:58 <monsieur_max> ah ok :) i was looking elsewhere :)
20131004 10:52:59 <xranby> http://jogamp.org/git/?p=jogl.git;a=tree;f=src/test/com/jogamp/opengl/test/junit/jogl/demos/es2;h=5eb7716778b628eeeba764094159d0a82e9784ff;hb=HEAD
20131004 10:53:16 <monsieur_max> yesh, thanks
20131004 10:53:35 <xranby> these demos are the most well tested since they gets tested using the autobuilders
20131004 10:54:04 <xranby> then there is the larger jogl-demos git
20131004 10:54:27 <xranby> that include around 200+ demos , some of them are showcased at http://jogamp.org/jogl-demos/www/
20131004 10:55:02 <xranby> http://jogamp.org/git/?p=jogl-demos.git;a=tree
20131004 10:56:18 <xranby> here you may find any jogl code, matching opengl books using various api's like swing, swt, newt etc etc.
20131004 10:56:29 <xranby> anything goes
20131004 10:56:35 <monsieur_max> great, many thanks
20131004 10:57:02 <monsieur_max> hopefully i'll find why native call crashes
20131004 10:57:14 <xranby> please file a bugreport
20131004 10:57:20 <xranby> and we will look at your crash log
20131004 10:57:32 <monsieur_max> well, i'll fill this once i'm sure the issue is not my fault
20131004 10:58:01 <monsieur_max> i'm quite unexperimented in jogl, and don't want to waste time of people
20131004 10:58:46 <xranby> do you have some code that I can test?
20131004 10:59:52 <monsieur_max> not yet, if everthing fails, i'll make a unit test
20131004 11:00:40 <monsieur_max> i already found out that shader compilation is more strict that in my previous version ( 2.0rc12 )
20131004 11:01:02 <xranby> the shader compilation is always performed by the driver
20131004 11:01:39 <xranby> JOGL can request different kind of opengl contexts depending on how you initialize your application
20131004 11:01:58 <monsieur_max> well... for a reason i ignore, in 2.0rc12 my "loose" shaders are compiling, and with the current autobuild, they're not, i had to make changes in order to make them more compliant
20131004 11:02:04 <xranby> the largest change with JOGL 2.0.2 is that it adds opengl 4 and es 3 support
20131004 11:02:21 <monsieur_max> well, that was one of my guess
20131004 11:02:35 <xranby> thus if you request a "default" context you get the newest opengl context that the driver support
20131004 11:03:09 <xranby> so if you know on forehand that you only will use opengl 2 calls use the GL2 profile
20131004 11:03:57 <monsieur_max> like in : NewtFactory.createWindow(screen, new GLCapabilities(GLProfile.getGL2ES2()));
20131004 11:04:01 <xranby> if you use GL2ES2 you actrually need to make your code GL3 core compatible because GL2ES2 actually is GL3 core compliant
20131004 11:04:28 <monsieur_max> xranby: yep, that's basically what i had to do in my shaders :)
20131004 11:04:32 <xranby> thus you may run into issues using GL2 functionality on GL3 hardware
20131004 11:04:56 <xranby> ok i can guide you what to do
20131004 11:05:14 <monsieur_max> well, that part is fixed :)
20131004 11:05:20 <xranby> you need to write your shaders so that they are compatible with both ES2 and GL3
20131004 11:06:25 <xranby> GLSL is compiled outside JOGL... so hwhat JOGL provide is helper classes
20131004 11:06:39 <xranby> that can rewrite your shader automatically for the hardware in use
20131004 11:07:10 <xranby> ok next part.. is
20131004 11:08:16 <monsieur_max> well, i have obviously issue when calling glDrawElements
20131004 11:10:37 <monsieur_max> juste apsting that here, if you have already an idea of what is going wrong : http://pastebin.com/YdnbMr72
20131004 11:10:44 <monsieur_max> but if not, don't bother, i'll investigate
20131004 11:12:39 <xranby> most likely similar to https://jogamp.org/bugzilla/show_bug.cgi?id=821
20131004 11:13:04 <xranby> https://jogamp.org/bugzilla/show_bug.cgi?id=821#c9
20131004 11:13:57 <xranby> most likely you have not created and bound a "VBO" when you use a "VBO" only GL3 core context
20131004 11:16:00 <xranby> the reason why jogl do not give a backward compatible context on all desktops is because all desktop operatingsystems no longer contains a backward compatible context
20131004 11:16:17 <xranby> for example macos x have removed the backward compatible context
20131004 11:16:50 <xranby> the recommendation for best mobile + desktop compatibility is to use VBO's
20131004 11:17:14 <xranby> this means that the programmer must allocate memory inside the GPU
20131004 11:17:34 <xranby> before you can use draw calls like glDrawElemets
20131004 11:17:46 <monsieur_max> mmmh
20131004 11:17:51 <xranby> using VBO's is thus under the programmers controll
20131004 11:17:56 <xranby> it simplify the opengl drivers
20131004 11:18:10 <monsieur_max> you mean that yu must always create a VBO ?
20131004 11:18:15 <xranby> yes
20131004 11:18:37 <monsieur_max> oh oh
20131004 11:18:44 <xranby> the implicit VBO have been deprecated by opengl spec
20131004 11:19:05 <xranby> using all new opengl specifications you have to explicit create the VBO
20131004 11:19:34 <xranby> and using all new opengl specifications all "immidiate mode" is removed
20131004 11:19:48 <xranby> the fixed function pipeline is gone
20131004 11:20:30 <monsieur_max> totally make sense .... when you explained it :)
20131004 11:20:58 <monsieur_max> xranby: thank you for you help, i'm heading in that direction then
20131004 11:21:18 <xranby> monsieur_max: what we will do in jogl is to improve the exception
20131004 11:21:50 <xranby> turn the crash (for not using a vbo) into a java exception
20131004 11:21:52 <monsieur_max> great idea, native erros is a bit scary for noobish devs as i am :)
20131004 11:24:41 <xranby> like stated in the bugreport evaluation, we may "Remove the array/buffer variant from all core GL profiles, i.e. only provide the VBO offset ones. " when using the GL2ES2 profile (since they are only available on ES and desktop profiles that are backward compatible)
20131004 11:25:27 <xranby> if we remove it from the profile will prevent users to write new code that is not compatible with the latest opengl drivers
20131004 11:26:19 <xranby> and thus funnel programmers into writing code that is more desktop and mobile compatible
20131004 11:27:04 <monsieur_max> i would definitely aggree with such vision, but people might find a bit harsh to be forced to use VBOs
20131004 11:27:47 <xranby> the decision was really taken by the opengl spec lead since a decade back
20131004 11:27:52 <monsieur_max> but i'm definitely in a "desktop + mobile" compatible code so...
20131004 11:27:59 <xranby> to switch to the programmable pipeline
20131004 11:28:26 <xranby> by introducing the opengl core profiles with OpenGL 3
20131004 11:28:52 <xranby> and drop the legacy past
20131004 11:28:59 <monsieur_max> i did not even realize the existence of "immediate mode" until you mentionned it
20131004 11:29:53 <monsieur_max> when you mentionned "Remove the array/buffer variant from all core GL profiles", what are you talking about ?
20131004 11:30:29 <monsieur_max> ( sorry for the noob question )
20131004 11:33:10 <xranby> if you look at GL2ES2 that is a core profile notice that there exist two glVertexAttribPointer
20131004 11:33:25 <xranby> glVertexAttribPointer(int indx, int size, int type, boolean normalized, int stride, Buffer ptr)
20131004 11:33:27 <xranby> and
20131004 11:33:33 <xranby> void glVertexAttribPointer(int indx, int size, int type, boolean normalized, int stride, long ptr_buffer_offset)
20131004 11:34:06 <xranby> The one where you pass a Buffer is using immediate mode
20131004 11:34:34 <xranby> the latter is using an offset to the last bound VBO
20131004 11:34:54 <monsieur_max> bingo, that's the one i'm using
20131004 11:35:12 <xranby> thus with that statement we will remove glVertexAttribPointer(int indx, int size, int type, boolean normalized, int stride, Buffer ptr) since it is not gl3 core compatible
20131004 11:36:16 <xranby> monsieur_max: i can show you how to setup the VBO
20131004 11:36:40 <monsieur_max> xranby: well, it'll save me a lot of time indeed :)
20131004 11:37:35 <xranby> monsieur_max: i had to fix one of my GL2ES2 demo examples some month ago for exactly this reason.. here goes https://jogamp.org/git/?p=jogl-demos.git;a=commitdiff;h=84a886cf4957e8f55af39abf8e9bad04a1de2e4f
20131004 11:39:31 <monsieur_max> awesome, got it, nice you saved my life :) i have 3 spanish coworkers that are about to transform me in chorizo for having modified "domething-gl in the game" :P
20131004 11:39:43 <monsieur_max> *something
20131004 11:40:31 <monsieur_max> xranby: thanks again :)
20131004 11:41:04 <xranby> ok try follow the most rational VBO lifecycle glGenBuffers glBindBuffer glBufferData *draw stuff* glDeleteBuffers
20131004 11:42:14 <xranby> VBO allows you to buffer data before the main draw loop
20131004 11:43:49 <xranby> thus in the main draw loop you basically only need to do use glBindBuffer and glVertexAttribPointer to select the VBo you want to use
20131004 11:43:58 <xranby> for best performance
20131004 11:44:42 <monsieur_max> yeah, i figured out that i had a bit of refactoring to do to integrate this logic
20131004 11:53:48 * jk4 (~jk4@anon) Quit (Ping timeout: 240 seconds)
20131004 12:55:09 * jk4 (~jk4@anon) has joined #jogamp
20131004 15:39:21 * monsieur_max (~maxime@anon) Quit (Quit: Leaving.)
20131004 16:29:36 * monsieur_max (~maxime@anon) has joined #jogamp
20131004 20:35:04 * xranby-64 (~familjen@anon) has joined #jogamp
20131004 21:49:38 * xranby-64 (~familjen@anon) Quit (Ping timeout: 240 seconds)
20131004 21:57:15 * monsieur_max (~maxime@anon) Quit (Quit: Leaving.)
20131004 22:29:25 * void256 (~void@anon) has joined #jogamp
20131004 22:56:59 * void256 (~void@anon) Quit (Remote host closed the connection)
20131005 00:20:54 <rmk0> i see mesa 9.2 lost their precision defaults for GLSL ES shaders
20131005 00:21:18 <rmk0> it used to (illegally) provide defaults, now you have to state "precision highp int;" etc, everywher
20131005 00:21:23 <rmk0> e
20131005 00:27:13 <sgothel> ShaderUtils .. customize ..
20131005 00:27:36 <sgothel> so - thats good news (better compliance)
20131005 00:27:43 <rmk0> got my own shader generator... was just warning anyone here that might run into it
20131005 00:27:47 <rmk0> yeah, it's definitely better
20131005 00:27:59 <rmk0> the standard does specifically say "there are no defaults"
20131005 00:28:13 <sgothel> me just promoting jogl stuff :)
20131005 00:28:17 <rmk0> hehe
20131005 04:53:48 * jk4 (~jk4@anon) Quit (Ping timeout: 240 seconds)
20131005 04:54:37 * jk4 (~jk4@anon) has joined #jogamp
20131005 05:05:31 -jogamp- Continue @ http://jogamp.org/log/irc/jogamp_20131005050531.html