#jogamp @ irc.freenode.net - 20151230 05:05:14 (UTC)


20151230 05:05:14 -jogamp- Previous @ http://jogamp.org/log/irc/jogamp_20151229050513.html
20151230 05:05:14 -jogamp- This channel is logged @ http://jogamp.org/log/irc/jogamp_20151230050514.html
20151230 08:46:56 * Eclesia (~husky@anon) has joined #jogamp
20151230 08:47:08 <Eclesia> hi
20151230 10:33:22 <bruce-> are there differences in performance when I use allocate vs directAllocate on buffers that I use to fill textures and vbos?
20151230 10:47:13 <Eclesia> If I remember correctly, rmk0 once told me everything ends up as direct byte buffers to transfer to the gpu, so you better use those
20151230 10:47:36 <Eclesia> releasing those is a bit more tricky unfortunatly
20151230 10:47:58 <bruce-> yeah, I found some ugly code for that
20151230 10:48:07 <Eclesia> jogl has some utility class somewhere
20151230 10:48:28 <bruce-> hm, maybe better to rely on that
20151230 10:49:21 <bruce-> what I use now relies on importing from sun.misc
20151230 11:10:53 <bruce-> can't really find the jogl utlities to destroy direct buffers
20151230 11:19:23 <Eclesia> you should asks the gods ^^
20151230 11:20:43 <bruce-> they are always so cryptic
20151230 11:20:56 <bruce-> telling me to check the source or the tests
20151230 11:21:03 <bruce-> without pointing out which one in specific
20151230 11:21:21 <bruce-> always->often
20151230 11:22:09 <Eclesia> bruce-: https://bitbucket.org/Eclesia/unlicense/src/a8f50af223cf862e71dfe56e1604941005468e44/engine/engine-opengl-util/src/main/java/un/impl/opengl/GLBuffer.java?at=default&fileviewer=file-view-default
20151230 11:23:45 <bruce-> at least that is something I can click on
20151230 11:26:59 <Eclesia> going to eat ++
20151230 12:31:50 <spaceemo_> o/ Eclesia
20151230 12:31:55 * spaceemo_ is now known as spaceemotion
20151230 12:34:28 <bruce-> I am at a loss here, I have my application freeze inside glDrawArraysInstanced when I draw 37364 instances, but I have no problems when I call it (on exactly the same data) with 93028 instances
20151230 12:35:21 <spaceemotion> may be a driver issue? have you tried it on a different computer yet? i havent used instanced rendering yet, but it does seem weird…
20151230 12:36:01 <bruce-> I don't have a different computer at hand, I did try upgrading osx from 10.10.1 to 10.10.5 and even switching to nvidia's web drivers with no difference
20151230 12:37:38 <spaceemotion> so you're using the buffers when calling the gl methods? what about using arrays?
20151230 12:39:22 <spaceemotion> in case JOGL uses the java.nio buffers, there's a problem with them: http://www.evanjones.ca/java-bytebuffer-leak.html
20151230 12:39:45 <bruce-> leaking would not cause this behaviour
20151230 12:40:06 <spaceemotion> right…
20151230 12:40:38 <spaceemotion> this was more directed towards Eclesia, as he is using the nio package in is unlicenced project
20151230 15:12:23 <Eclesia> spaceemotion: array ?
20151230 15:13:43 <spaceemotion> Eclesia for example, I use a temporary array as parameter instead of the buffers for the gl calls
20151230 15:14:39 <Eclesia> ho... I use arrays -> easier to use
20151230 15:15:52 <Eclesia> I only use buffer for big datas, textures,vbo,...
20151230 15:16:20 <spaceemotion> yup
20151230 16:51:45 <spaceemotion> Eclesia btw, i got my 3d billboards working :) i can even pick them properly now
20151230 16:52:01 <Eclesia> colorpicking ?
20151230 16:53:58 <spaceemotion> well, indexpicking. i have a custom FBO that renders with my model indexes instead of a color
20151230 16:54:06 <bruce-> http://pastebin.com/mHWQSDbc anyone ideas why this will freeze in the last call?
20151230 16:54:07 <spaceemotion> just like the old gameboy did
20151230 16:54:52 <bruce-> (I have the same results without the tbo stuff btw)
20151230 16:55:12 <Eclesia> bruce-: no idea sorry
20151230 16:55:36 <Eclesia> it should freeze anyway
20151230 16:55:36 <bruce-> also, it will not freeze if I draw more instances at the same time
20151230 16:57:20 <bruce-> or less than 37364
20151230 16:57:21 <Eclesia> should not*
20151230 16:57:59 <bruce-> it works fine for 100000 instances but not 37364, this is driving me crazy
20151230 17:02:03 * Eclesia (~husky@anon) has left #jogamp
20151230 17:54:47 * spaceemotion (~spaceemot@anon) Quit (Quit: Textual IRC Client: www.textualapp.com)
20151230 18:14:20 * badshah400 (~badshah40@anon) has joined #jogamp
20151230 18:58:35 * badshah400 (~badshah40@anon) Quit (Read error: Connection reset by peer)
20151230 18:58:36 * badshah400_ (~badshah40@anon) has joined #jogamp
20151230 18:58:42 * badshah400_ is now known as badshah400
20151230 19:46:22 <bruce-> I have written a very isolated version of the program in which I encounter this bug
20151230 19:46:26 <bruce-> http://pastebin.com/atcJ8ZbK
20151230 19:46:56 <bruce-> can someone see something that is obviously wrong?
20151230 19:47:37 <bruce-> I can provide a git repo with a pom.xml to make compiling a bit easier
20151230 19:49:06 * rmk0 eyes it
20151230 19:49:39 <bruce-> I encountered this problem on OSX 10.10.1, OSX 10.10.5 on a 2010 macbook pro with nvidia 320M
20151230 19:50:32 <bruce-> there is an interval from 37361 to 37405 for which glDrawArraysInstanced freeze for me
20151230 19:50:32 * Eclesia (~eclesia@anon) has joined #jogamp
20151230 19:58:23 <rmk0> bruce-: unable to reproduce on linux/intel, unfortunately
20151230 19:59:55 <bruce-> ok, at least it is not how I do thing that is entirely wrong then
20151230 19:59:59 <rmk0> it looks correct to me
20151230 20:01:02 <rmk0> i'm curious...
20151230 20:01:10 <bruce-> so am I
20151230 20:01:13 <rmk0> that page: https://www.opengl.org/sdk/docs/man4/html/glDrawArraysInstanced.xhtml
20151230 20:01:20 <rmk0> "glDrawArraysInstanced has the same effect as:"
20151230 20:01:31 <bruce-> I have already wasted two days on this now
20151230 20:01:34 <rmk0> have you tried writing it in the form of that loop, and seeing if the same thing happens?
20151230 20:03:59 <bruce-> that passes for me
20151230 20:05:00 <rmk0> https://www.opengl.org/discussion_boards/showthread.php/181142-glDrawArraysInstanced-max-number-of-instances
20151230 20:05:03 <rmk0> assume you've seen that
20151230 20:05:26 <rmk0> no resolution, but the same numbers
20151230 20:05:46 <bruce-> that is curious yes
20151230 20:06:39 <rmk0> do you get the same freeze if you make the vertices GL_HALF_FLOAT or something small?
20151230 20:08:49 <bruce-> yes
20151230 20:09:00 <bruce-> or even with a a single triangle instead of two
20151230 20:09:50 <rmk0> it seems pretty likely that this is a driver bug
20151230 20:09:58 <bruce-> yeah
20151230 20:10:14 <bruce-> the amount of time I have wasted on this
20151230 20:10:20 <rmk0> i can imagine >_<
20151230 20:10:29 <bruce-> I first encountered it in a multi threaded application
20151230 20:10:37 <bruce-> so I thought it was a threading issue
20151230 20:11:47 <rmk0> what's the instancing for in this case?
20151230 20:12:01 <bruce-> drawing a lot of circles
20151230 20:12:10 <rmk0> am assuming that you're going to end up having to do it in smaller batches to work around this crap
20151230 20:12:22 <bruce-> yeah, I will use smaller batches now
20151230 20:12:38 <bruce-> it is just sad that I cannot query what is a good batch size
20151230 20:13:40 <rmk0> any idea what the procedure is for filing a bug there?
20151230 20:13:45 <rmk0> not sure if nvidia or apple are to blame
20151230 20:14:11 <bruce-> I am actually using the nvidia web driver now
20151230 20:14:22 <bruce-> (the problem also exists on the apple driver)
20151230 20:17:48 <bruce-> I could try to submit it to nvidia
20151230 20:17:59 <Eclesia> bruce-: might be stupid, but what if you give a correct stride to your vbo ?
20151230 20:18:32 <Eclesia> gl.glVertexAttribPointer(positionLocation, 4, GL.GL_FLOAT, false, 4*4, 0);
20151230 20:19:03 <Eclesia> rmk0: am i right ? 4 samples of type float
20151230 20:19:07 <Eclesia> 4*4
20151230 20:19:14 <rmk0> yep
20151230 20:19:19 <bruce-> I thought 0 assumes the stuff is packed back to back
20151230 20:19:25 <rmk0> it does
20151230 20:19:29 <rmk0> they could be screwing it up!
20151230 20:19:45 <bruce-> in the real application the stride is correct with the same result
20151230 20:19:52 <Eclesia> ha some troubles because of this on my firegl at work :/
20151230 20:19:57 <bruce-> but I will try it in the isolated one, just for the sake of it
20151230 20:19:59 <Eclesia> had*
20151230 20:20:36 <bruce-> no, still freezes
20151230 20:21:02 <Eclesia> the vertices seems small too. 6*16
20151230 20:21:39 <Eclesia> should it be 100000*4 ?
20151230 20:22:13 <Eclesia> not sure how it behaves when you get outside the buffer range
20151230 20:22:40 <bruce-> instance counts have nothing to do with buffer ranges
20151230 20:23:01 <Eclesia> sorry, I never used instanced drawing :)
20151230 20:23:14 <bruce-> as long as you don't fetch stuff from tbos using instanceID that is
20151230 20:24:15 <bruce-> rmk0: thanks for checking and finding that forum post. I don't fully understand how I have not been able to find it myself (I googled for freeze and glDrawArraysInstanced)
20151230 20:24:33 <rmk0> just lucky... search engines seem to give basically random results these days
20151230 20:24:44 <bruce-> some people have all the luck …
20151230 20:24:47 <rmk0> i think this time it was "glDrawArraysInstanced nvidia bug"
20151230 20:25:25 <bruce-> at least I had the chance to play with jogls tracing contexts
20151230 20:25:39 <bruce-> that was helpful
20151230 20:34:20 <rmk0> bruce-: https://github.com/io7m/nvidia-bug-20151230
20151230 20:34:26 <rmk0> they'll no doubt want it in C...
20151230 20:34:34 <rmk0> does that one freeze for you?
20151230 20:34:47 <rmk0> needs GLFW 3 to build
20151230 20:35:46 <bruce-> I have to build some food first
20151230 20:36:02 <bruce-> then I can try to compile C code without becoming angry
20151230 20:36:09 <rmk0> hehe
20151230 21:03:34 <Eclesia> what do you think of thing like this to describe a UI ? http://pastebin.com/Az2zK83C
20151230 21:11:38 <bruce-> I have recently been working on something that works similar to DOM+CSS
20151230 21:12:44 <bruce-> I like how it separates structure from appearance
20151230 21:14:26 <Eclesia> css is very limited
20151230 21:14:36 <Eclesia> made something a bit better :D
20151230 21:15:03 <Eclesia> bruce-: I think you will understand it very quickly : https://bitbucket.org/Eclesia/unlicense/src/tip/engine/engine-ui/src/main/resources/un/engine/ui/widget/default.rs?at=default&fileviewer=file-view-default
20151230 21:15:04 <bruce-> how is css limited and how is your thing better?
20151230 21:15:14 <bruce-> in english? :)
20151230 21:15:56 <Eclesia> well 3 things :
20151230 21:16:16 <Eclesia> - shapes like : arrow-left : 'POLYGON((20% 50%, 80% 0%, 80% 100%, 20% 50%))';
20151230 21:16:43 <Eclesia> with % units or pixels units, or even some maths : 100% + 20
20151230 21:17:01 <Eclesia> 2) references
20151230 21:17:13 <Eclesia> brush-paint : $color-main;
20151230 21:17:55 <Eclesia> $color-main reference some value defined previously, so you can group the palette colors in one place.
20151230 21:18:07 <Eclesia> 3) Rules !
20151230 21:18:27 <Eclesia> MousePress : @Rule { filter : "MousePress"=true ; border : {...}; };
20151230 21:18:48 <Eclesia> filter : "MousePress"=true <--- works for any property of the widget
20151230 21:19:41 <Eclesia> you could write : filter : "Text" = ""; $background = #FF0000; to have a red background when the textfield is empty
20151230 21:21:26 <Eclesia> bruce-: looking the file will make it clear ^^
20151230 21:21:28 <bruce-> (like the :empty pseudoclass? :))
20151230 21:22:04 <bruce-> (or the [attribute=something] selector)
20151230 21:22:43 <Eclesia> similar but more possibilities
20151230 21:23:05 <Eclesia> you can also put rules in rules
20151230 21:27:48 <Eclesia> I mixed W3C css with others like OGC Symbology Encoding and ISO Portrayal Service.
20151230 21:39:14 <bruce-> yeah there is some interesting stuff in there
20151230 21:39:29 <bruce-> rmk0: I get unable to create window
20151230 21:39:43 <rmk0> blarg!
20151230 21:42:44 <bruce-> which deity do I offer my first born to for this to work?
20151230 21:43:07 <rmk0> sounds like glfw is broken
20151230 21:43:47 <rmk0> is four lines of code...
20151230 21:45:13 <Eclesia> bruce-: buy a really graphic card
20151230 21:45:44 <Eclesia> real*
20151230 21:46:29 <bruce-> don't be facetious
20151230 21:47:50 <bruce-> also there is no way to upgrade the graphics adapter without replacing the entire machine :)
20151230 21:56:08 <bruce-> rmk0: ok, got a window now, but I get an glError somewhere
20151230 22:00:17 * trigger_ (5ce4f980@anon) has joined #jogamp
20151230 22:00:41 <trigger_> hi
20151230 22:03:39 <Eclesia> good night all ++
20151230 22:03:50 * Eclesia (~eclesia@anon) Quit (Quit: Leaving.)
20151230 22:04:45 <bruce-> rmk0: I see you don't use any shaders, would that not be a problem?
20151230 22:05:29 <bruce-> rmk0: glDrawArraysInstanced raises GL_INVALID_OPERATION
20151230 22:08:29 <bruce-> for reference, I get the same behaviour in my java program when I take out all shader code
20151230 22:10:58 <trigger_> btw, why did the texture coordinates flip with the new JOGL 2.0??
20151230 22:11:57 <trigger_> I think the old behaviour where (0,0) was the bottom left of the texture was the intended coordinate system for textures in opengl
20151230 22:12:16 <trigger_> but with the new JOGL 2.0 the bottom left is now (1,0) :-)
20151230 22:26:00 <bruce-> rmk0: added shader stuff, now freezes
20151230 23:02:01 * trigger_ (5ce4f980@anon) Quit (Quit: Page closed)
20151231 01:09:57 * badshah400 (~badshah40@anon) Quit (Read error: Connection reset by peer)
20151231 01:10:04 * badshah400_ (~badshah40@anon) has joined #jogamp
20151231 01:10:10 * badshah400_ is now known as badshah400
20151231 01:36:59 * badshah400 (~badshah40@anon) Quit (Read error: Connection reset by peer)
20151231 01:37:16 * badshah400_ (~badshah40@anon) has joined #jogamp
20151231 01:37:21 * badshah400_ is now known as badshah400
20151231 05:05:14 -jogamp- Continue @ http://jogamp.org/log/irc/jogamp_20151231050514.html