#jogamp @ irc.freenode.net - 20130815 05:06:07 (UTC)


20130815 05:06:07 -jogamp- Previous @ http://jogamp.org/log/irc/jogamp_20130814050607.html
20130815 05:06:07 -jogamp- This channel is logged @ http://jogamp.org/log/irc/jogamp_20130815050607.html
20130815 13:23:26 * xranby (~xranby@anon) Quit (Ping timeout: 256 seconds)
20130815 13:43:59 * xranby (~xranby@anon) has joined #jogamp
20130815 16:59:48 * xranby (~xranby@anon) Quit (Ping timeout: 276 seconds)
20130815 18:07:41 * xranby (~xranby@anon) has joined #jogamp
20130815 18:48:57 * petrs (~petrs@anon) has joined #jogamp
20130815 18:49:00 <petrs> o/
20130815 18:53:57 <petrs> is it possible to capture image of offscreen window w/ GLReadBufferUtil.readPixels?
20130815 18:54:22 <petrs> idk its failing coz readPixelBuffer.isValid() is false
20130815 18:54:26 <petrs> any ideas?
20130815 18:56:08 * xranby (~xranby@anon) Quit (Ping timeout: 268 seconds)
20130815 19:04:25 * xranby (~xranby@anon) has joined #jogamp
20130815 19:19:57 * kermyt (~kermyt@anon) Quit (Ping timeout: 264 seconds)
20130815 19:52:53 * kermyt (~kermyt@anon) has joined #jogamp
20130815 20:37:29 <petrs> anybody here? xD
20130815 21:44:02 * x-s4nd3r (~x-s4nd3r@anon) has joined #jogamp
20130815 21:49:46 * x-s4nd3r (~x-s4nd3r@anon) Quit (Remote host closed the connection)
20130815 21:53:00 * x-s4nd3r (~x-s4nd3r@anon) has joined #jogamp
20130815 22:05:45 * x-s4nd3r (~x-s4nd3r@anon) Quit (Quit: i'll be back in a moment, just gotta do some stuff...)
20130815 23:38:15 * kermyt (~kermyt@anon) Quit (Ping timeout: 276 seconds)
20130815 23:40:22 * kermyt (~kermyt@anon) has joined #jogamp
20130815 23:50:37 <petrs> meh finally got it, first struggling to build all.debug jar had same size like normal jar so i spent like 1h reading makefiles and in the end it was just clean... xD so the problem GLReadBufferUtil(true, false) i didnt set GLCapabilities.setAlphaBits so pixel dataformat was 0 and it all went to... this line in GLPixelAttributes: this.bytesPerPixel = ( 0 < dataFormat && 0 < dataType ) ? GLBuffers.bytesPerPixel(dataFormat, dataType) : 0; *rage*
20130815 23:51:34 <sgothel> back ..
20130815 23:51:44 <sgothel> Hi Petrs .. reading ..
20130815 23:51:50 <petrs> xd
20130815 23:51:56 <petrs> hi sven
20130815 23:52:09 <sgothel> bug in jogl or your code ?
20130815 23:52:32 <sgothel> i.e. dataFormat, dataType setting .. who's fauls ?
20130815 23:52:35 <sgothel> *fault*
20130815 23:53:22 <sgothel> (btw .. shall we close that image bugs you fixed, or you like to continue on it ? .. or add a subsequent bug entry, like 'beauty' / enhancement ?
20130815 23:55:14 <sgothel> GLPixelAttributes ..
20130815 23:56:09 <petrs> well it was mistake on my side... but u know it wasnt rly obvious whats the problem... GLReadBufferUtil.readPixels could have some nicer error handling :p
20130815 23:56:37 <sgothel> sure .. I am all open
20130815 23:56:55 <sgothel> you use the defaultProvider .. I assume ?
20130815 23:57:01 <petrs> yes
20130815 23:57:26 <petrs> or im not sure if it is an error
20130815 23:57:31 <sgothel> -> GLPixelBuffer .. lines 104/105 ? hmm
20130815 23:57:52 <sgothel> i.e. which caused the 0 format/type ?
20130815 23:58:04 <petrs> yeye
20130815 23:58:36 <sgothel> was the ctx not current ?
20130815 23:59:38 <petrs> u mean like it was from another thread?
20130815 23:59:48 <sgothel> we should throw an exception .. if some basic req. were not met ..
20130816 00:00:19 <sgothel> I dunno .. just like to know the case where you got this byteCount == 0 ..
20130816 00:00:32 <sgothel> maybe you can show / create a little unit test ?
20130816 00:01:23 <sgothel> i.e. we should react to such cases, and your 1h should not be invane!
20130816 00:01:35 <petrs> haha
20130816 00:02:26 <sgothel> so what caused the format/type 0 ?
20130816 00:02:51 <petrs> ye ill make some test...
20130816 00:02:58 <sgothel> thank you!!!
20130816 00:03:05 <petrs> heres just example
20130816 00:03:06 <petrs> http://pastebin.com/gaFVPMEX
20130816 00:04:12 <petrs> GLReadBufferUtil(true, false) / caps.setAlphaBits(1);
20130816 00:06:31 <sgothel> dFormat = ctx.getDefaultPixelDataFormat();
20130816 00:06:31 <sgothel> dType = ctx.getDefaultPixelDataType();
20130816 00:06:42 <sgothel> one produces '0' .. at least ? hmm
20130816 00:06:48 <petrs> yes
20130816 00:07:28 <sgothel> this is a fine bug ..
20130816 00:07:50 <sgothel> you like to file it ?
20130816 00:09:15 <sgothel> hmm .. so ctx was current
20130816 00:09:40 <sgothel> gl.glGetIntegerv(GL.GL_IMPLEMENTATION_COLOR_READ* -> 0
20130816 00:10:03 <sgothel> GLContextImpl line 1942 ?
20130816 00:10:25 <sgothel> assuming your ctx is isGLES2Compatible() == true
20130816 00:10:43 <sgothel> some new NV/AMD driver ?
20130816 00:11:17 <sgothel> however, we should check the result .. and at least fall back to the safe values (RGBA/UNSIGNED_BYTE)
20130816 00:17:05 <petrs> well i have gtx295 and driver 314.07 so not rly new
20130816 00:17:14 <petrs> win8
20130816 00:19:16 <sgothel> ok - 1st step: adding args-check in GLPixelAttributes -> GLException if zero size
20130816 00:19:27 <sgothel> then we need to refine the GLContexImpl method ..
20130816 00:20:30 <petrs> right
20130816 00:21:05 <sgothel> bug entry 1st ..
20130816 00:28:44 <sgothel> https://jogamp.org/bugzilla/show_bug.cgi?id=817
20130816 00:29:38 <petrs> thx
20130816 00:30:12 <sgothel> working on fix .. a few minutes, pls test .. just to check whether this works for your driver as well - thank you!
20130816 00:30:36 <petrs> well but it behaves correctly on some level because context is created w/o alpha caps so it cant produce image/texture or w/e w/ alpha format like rgba etc?, atleast thats how i think it works but you are the expert xd
20130816 00:31:05 <sgothel> that is a detail .. left to impl.
20130816 00:31:20 <sgothel> however, we shall not have a valid pixel description w/ zero size
20130816 00:31:32 <petrs> ye
20130816 00:31:47 <sgothel> what you describe, i.e. read RGBA from RGB framebuffer .. result maybe undef .. for alpha
20130816 00:31:59 <sgothel> I am sure some spec elaborates on this .. but unsure now :)
20130816 00:52:11 <sgothel> http://jogamp.org/git/?p=jogl.git;a=commit;h=c19f9916bc59765e5aaf307b8ecd5d25dfcad6b6 .. should be similar unit test, i.e. should fail on your hardware ?!
20130816 00:52:56 <sgothel> int scripts/tests.sh add/use: testnoawt com.jogamp.opengl.test.junit.jogl.util.texture.TestBug817GLReadBufferUtilGLCTXDefFormatTypeES2NEWT $*
20130816 00:53:16 <petrs> https://dl.dropboxusercontent.com/u/38002291/jogl/TestPixelAttributesZeroBug817.java
20130816 00:54:12 <petrs> xD
20130816 00:56:23 <sgothel> .. how about my unit test above git commit ? does it fail as well ?
20130816 00:56:33 <sgothel> btw .. can you push your test to git ?
20130816 00:58:43 <petrs> brb
20130816 00:58:50 <sgothel> read yours .. should be similar ..
20130816 01:09:59 <petrs> back
20130816 01:10:12 <petrs> no yours is better
20130816 01:10:46 <sgothel> so fails for you as expected ?
20130816 01:10:57 <petrs> sec
20130816 01:11:43 <petrs> compiling
20130816 01:13:04 <sgothel> NV w/ linux ?
20130816 01:14:53 <petrs> it doesnt fail :s i got NV win8
20130816 01:15:23 <sgothel> what is different w/ your test ? hmm.
20130816 01:15:28 <sgothel> pbuffer something ?
20130816 01:16:13 <petrs> ye its offscreen window
20130816 01:21:44 <sgothel> .. adding pbuffer and fbo ..
20130816 01:23:39 <petrs> np
20130816 01:23:40 <sgothel> bab13046729d8283876e4d2f8855a38ff311d375 <- ?
20130816 01:24:01 <sgothel> I like to see it failing w/ unit test, before I push the fix :)
20130816 01:25:37 <sgothel> if not failing, pls fix test .. hmm
20130816 01:32:55 <petrs> hm
20130816 01:33:16 <petrs> mb its not failinf coz theres no assert? like Assert.assertEquals(pixelAttribs.bytesPerPixel, 0);?
20130816 01:33:53 <sgothel> pls try .. adding one, and push-back your changes .. I thought it creates an exception by default .. no ?
20130816 01:34:03 <sgothel> png screenshots ok ?
20130816 01:34:26 <sgothel> (the patch which causes an exception in PixelAttr. is not yet pushed)
20130816 01:35:33 <sgothel> 65833bbcec423f9741116dc9b785e6954f2fcec7 <- pushed .. should throw now
20130816 01:35:55 <petrs> ye screenshots are ok if i add that assert 5/8 tests fails
20130816 01:36:07 <sgothel> very good ..
20130816 01:36:18 <petrs> should i keep it there?
20130816 01:36:20 <sgothel> w/ 65833bbcec423f9741116dc9b785e6954f2fcec7 it throws per default ?
20130816 01:39:53 <sgothel> be0204ffe66bb9cb2918bfb01d0235fcaf0b3920 <- fix pushed ..
20130816 01:40:17 <petrs> all tests failed
20130816 01:41:26 <sgothel> very good :)
20130816 01:41:36 <sgothel> and fix .. should fix it .. err ?
20130816 01:44:09 <sgothel> petr.skramovsky .. you ?
20130816 01:44:55 <petrs> yes
20130816 01:45:39 <sgothel> https://jogamp.org/bugzilla/show_bug.cgi?id=817 -> VERIFIED if it's working .. thank you!
20130816 01:46:20 <petrs> ye all tests passed so its fixed!
20130816 01:46:26 <sgothel> sweet
20130816 01:46:31 <petrs> gj thank you
20130816 01:50:32 <petrs> meh have to do some android stuff to job... :s gn btw nice bof could be longer
20130816 01:51:09 <sgothel> thank you .. hehe, the project itself got quite short :)
20130816 05:06:07 -jogamp- Continue @ http://jogamp.org/log/irc/jogamp_20130816050607.html