#jogamp @ irc.freenode.net - 20140707 05:05:30 (UTC)
20140707 05:05:30 -jogamp- Previous @ http://jogamp.org/log/irc/jogamp_20140706050530.html
20140707 05:05:30 -jogamp- This channel is logged @ http://jogamp.org/log/irc/jogamp_20140707050530.html
20140707 07:09:44 * zzuegg (zzuegg@anon) has joined #jogamp
20140707 07:13:44 * eclesia (~husky@anon) has joined #jogamp
20140707 07:14:14 <eclesia> good morning
20140707 07:37:59 * hija (~hija@anon) has joined #jogamp
20140707 07:56:53 * hija (~hija@anon) Quit (Quit: hija)
20140707 08:28:03 * eclesia (~husky@anon) Quit (Ping timeout: 255 seconds)
20140707 08:33:08 * eclesia (~husky@anon) has joined #jogamp
20140707 08:45:10 * hija (~hija@anon) has joined #jogamp
20140707 09:54:42 * Hauer (~chatzilla@anon) has joined #jogamp
20140707 10:06:17 * jvanek (jvanek@anon) has joined #jogamp
20140707 10:34:32 * eclesia (~husky@anon) Quit (Ping timeout: 264 seconds)
20140707 10:48:50 * Hauer (~chatzilla@anon) Quit (Ping timeout: 252 seconds)
20140707 10:48:55 * monsieur_max (~maxime@anon) has joined #jogamp
20140707 10:50:29 * eclesia (~husky@anon) has joined #jogamp
20140707 10:51:00 * Hauer (~chatzilla@anon) has joined #jogamp
20140707 10:51:19 * Hauer is now known as hauer
20140707 10:58:29 * eclesia (~husky@anon) Quit (Ping timeout: 248 seconds)
20140707 11:12:41 * eclesia (~husky@anon) has joined #jogamp
20140707 11:16:58 * eclesia (~husky@anon) Quit (Read error: Connection reset by peer)
20140707 11:18:43 * eclesia (~husky@anon) has joined #jogamp
20140707 11:22:44 * eclesia1 (~husky@anon) has joined #jogamp
20140707 11:24:33 * eclesia (~husky@anon) Quit (Ping timeout: 240 seconds)
20140707 11:25:27 * monsieur_max (~maxime@anon) Quit (Quit: Leaving.)
20140707 11:28:26 * eclesia1 (~husky@anon) Quit (Ping timeout: 252 seconds)
20140707 11:28:51 * eclesia (~husky@anon) has joined #jogamp
20140707 11:28:55 <hauer> I am having trouble now with framebuffers and render to texture stuff : http://pastebin.com/ZVFpqAi1 (Nothing get's rendered to a texture)
20140707 11:30:09 <hauer> need to eat ... brb
20140707 11:34:48 * hauer (~chatzilla@anon) Quit (Ping timeout: 255 seconds)
20140707 12:06:29 * hauer (~chatzilla@anon) has joined #jogamp
20140707 12:08:47 <hauer> re
20140707 12:30:59 * xranby (~xranby@anon) Quit (Ping timeout: 245 seconds)
20140707 12:34:54 * xranby (~xranby@anon) has joined #jogamp
20140707 12:44:52 <hauer> So can someone help me out here? I just had 4 of my friends look over my code and we can not find anything that should cause this (nothing happens-) behavior
20140707 12:58:44 * eclesia1 (~husky@anon) has joined #jogamp
20140707 13:00:51 <sgothel> @Hauer and other students doing their university assignments .. you may post your basic OpenGL questions to our forum, while also stating that you are doing your university assigment.
20140707 13:01:05 <sgothel> @Hauer: However .. pls validate w/ our FBObject class
20140707 13:01:10 * eclesia (~husky@anon) Quit (Ping timeout: 264 seconds)
20140707 13:01:41 <hauer> I never said anything about assignments
20140707 13:01:47 <hauer> We are all having fun here :-D
20140707 13:01:57 <sgothel> i.e. FBObject is an FBO helper .. etc and we have lots of unit tests
20140707 13:02:01 <sgothel> ^^ just mentioning :)
20140707 13:04:28 <sgothel> @Hauer: your UBO unit test would still be welcome :)
20140707 13:06:31 <hauer> @sgothel I hosted that within my git repo, I actually already "copied" my code to that "ruler" and stuff
20140707 13:06:58 <hauer> @sgothel The code that works fine from within the JFrame with a GLCanvas now causes a stackfault though
20140707 13:07:24 <hauer> @sgothel Though that happens when I start setting up very basic shaders
20140707 13:07:30 <sgothel> something I can pull ? great, please repaste your git URI
20140707 13:07:49 <hauer> https://bitbucket.org/salbeira/jogl-ubo-tester
20140707 13:08:33 <hauer> The Class UniformBufferTestALT is the one you requested
20140707 13:08:49 <sgothel> will have a look at it later today - thank you Sebastian
20140707 13:10:02 <hauer> call me Hauer, everyone just uses my last name
20140707 13:13:50 * jvanek (jvanek@anon) Quit (Quit: Leaving)
20140707 13:23:02 * eclesia (~husky@anon) has joined #jogamp
20140707 13:23:18 <sgothel> continues stereo discussion: https://jogamp.org/bugzilla/show_bug.cgi?id=1021#c12
20140707 13:24:00 <sgothel> I refine the work done .. and will update when pushed to git repo. this shall enable one to experiment w/ diff. custom stereo settings
20140707 13:24:08 <sgothel> (device .. etc)
20140707 13:24:16 * eclesia1 (~husky@anon) Quit (Ping timeout: 260 seconds)
20140707 13:24:20 <sgothel> if anybody has a SBS TV set .. you may try ..
20140707 13:27:32 * hauer (~chatzilla@anon) Quit (Ping timeout: 260 seconds)
20140707 13:52:46 * eclesia1 (~husky@anon) has joined #jogamp
20140707 13:54:11 * eclesia (~husky@anon) Quit (Ping timeout: 252 seconds)
20140707 14:01:33 * eclesia1 (~husky@anon) Quit (Ping timeout: 240 seconds)
20140707 14:01:54 * eclesia (~husky@anon) has joined #jogamp
20140707 14:15:27 * eclesia (~husky@anon) Quit (Ping timeout: 255 seconds)
20140707 14:15:41 * eclesia (~husky@anon) has joined #jogamp
20140707 14:27:03 * hharrison (~chatzilla@anon) has joined #jogamp
20140707 14:46:18 * eclesia (~husky@anon) Quit (Quit: Leaving.)
20140707 15:46:53 * hauer (~chatzilla@anon) has joined #jogamp
20140707 16:20:00 * hauer_ (~chatzilla@anon) has joined #jogamp
20140707 16:21:34 * hauer (~chatzilla@anon) Quit (Ping timeout: 240 seconds)
20140707 16:21:39 * hauer_ is now known as hauer
20140707 16:26:19 <hauer> How does one actually use your FBObject for a very basic FrameBuffer to test weather Frambuffering actually works ...
20140707 16:49:35 <hauer> Where does a fragment shader render to when there is a GL_COLOR_ATTACHMENT and a GL_DEPTH_ATTACHMENT?
20140707 16:56:13 <rmk0> hauer: a fragment shader renders to "draw buffers" and the mapping between color attachments and draw buffers is configurable with glDrawBuffers
20140707 16:56:35 <rmk0> if there's only one color attachment and one fragment shader output, the output will go to that attachment
20140707 16:56:46 <hauer> IntBuffer db = IntBuffer.allocate(1);
20140707 16:56:48 <hauer> db.put(GL_COLOR_ATTACHMENT0);
20140707 16:56:49 <hauer> gl.glDrawBuffers(1, db);
20140707 16:56:59 <hauer> Is there something wrong with that definition?
20140707 16:57:17 <rmk0> not that i can see
20140707 16:57:35 <hauer> http://pastebin.com/mjzBVRpb
20140707 16:57:41 <hauer> Can you look at this then?
20140707 16:57:47 * rmk0 eyes it
20140707 16:59:39 <rmk0> i don't see anything obviously wrong
20140707 16:59:45 <rmk0> have you tried apitrace?
20140707 16:59:57 <hauer> nope ... what is that?
20140707 16:59:59 <rmk0> https://apitrace.github.io/
20140707 17:00:08 <rmk0> is really invaluable for tracking down this kind of problem
20140707 17:00:20 <rmk0> allows you to inspect the current state of the gpu to some extent
20140707 17:00:31 <hauer> Well
20140707 17:00:37 <hauer> I have tried to debug a bit
20140707 17:01:06 <hauer> a few steps: I changed the internal color scheme of my Texture to RGB from RGBA
20140707 17:01:20 <rmk0> i think your problem was that the framebuffer doesn't appear to contain anything after rendering?
20140707 17:01:25 <hauer> Then I told my renderer to apply a green tint to the screen
20140707 17:01:39 <hauer> * not screen - everything that he DOES render
20140707 17:01:57 <hauer> Then I tell him to render that fb to the screen
20140707 17:02:03 <hauer> I get a correct green square
20140707 17:02:09 <hauer> though with nothing in it
20140707 17:02:57 <hauer> So the problem is: When I do my rendering calls while the frame buffer is bound, nothing is rendered to it
20140707 17:03:16 <rmk0> have you tried bindign the framebuffer, clearing it to some garish color, and then trying to render the contents of that fb to the screen?
20140707 17:03:20 <rmk0> *binding
20140707 17:03:49 <rmk0> it might narrow down the possibilities
20140707 17:04:52 <rmk0> really would recommend apitrace though... it'll let you look directly at the contents of the framebuffer, so you can see it without any possibility of your own rendering code not displaying it properly
20140707 17:05:46 <hauer> I'll try
20140707 17:05:54 <hauer> though I'll first try your idea
20140707 17:08:48 <rmk0> assume you're still running with DebugGL?
20140707 17:09:15 <hauer> I can uncomment that line every time
20140707 17:09:20 <hauer> no I do not get any errors
20140707 17:09:24 <hauer> neighter when initializing
20140707 17:09:27 <hauer> nor when rendering
20140707 17:09:33 <rmk0> right
20140707 17:09:51 <rmk0> silent failure is a favourite mode of the API
20140707 17:09:53 <hauer> I also set up two run configs in eclipse
20140707 17:10:04 <hauer> one for debugging VERY Verbose
20140707 17:10:12 <hauer> and one for launching and only seeing my own debugg messages
20140707 17:11:02 <hauer> Hmh
20140707 17:11:10 <hauer> I downloaded the executables of apitrace
20140707 17:11:30 <rmk0> think i know what's coming...
20140707 17:11:30 <hauer> What bin should I launch
20140707 17:11:49 <rmk0> think there's an apitrace.exe there
20140707 17:11:54 <hauer> launched that
20140707 17:12:00 <hauer> cmd popped up
20140707 17:12:04 <rmk0> is essentially "apitrace.exe trace java -cp ... "
20140707 17:12:05 <hauer> disappeared immediatly
20140707 17:12:37 <rmk0> is unfortunate that eclipse can't execute it directly... i asked on their forum and didn't get any usable answers
20140707 17:13:36 <rmk0> not sure which command you use to view traces on windows
20140707 17:13:42 <rmk0> is there a "qapitrace.exe" there?
20140707 17:13:54 <rmk0> is the QT-based gui you see in the screenshots on the site
20140707 17:15:39 <hauer> apitrace , gltrace
20140707 17:15:51 <hauer> d3dretrace
20140707 17:15:55 <hauer> inject.dll
20140707 17:15:59 <hauer> inject.exe
20140707 17:16:02 <hauer> less.exe
20140707 17:16:08 <hauer> lessecho.exe
20140707 17:16:12 <hauer> lesskey.exe
20140707 17:16:14 <rmk0> hrm
20140707 17:16:38 <rmk0> that's annoying... kind of assumed there'd be some sort of UI in the windows version
20140707 17:16:55 <rmk0> not as if QT is linux-only
20140707 17:17:51 <hauer> Oh there is
20140707 17:17:58 <hauer> but only for x86
20140707 17:18:03 <hauer> launched it
20140707 17:18:05 <hauer> I have a window now
20140707 17:18:23 <rmk0> oh... good. that's the program you use to examine a trace when your program has produced one
20140707 17:18:51 <rmk0> not much use until you actually have a trace... running your program under "apitrace trace" will produce a file called java.trace in the same directory
20140707 17:19:18 <rmk0> (obviously takes the name to use from the java executable)
20140707 17:19:29 <hauer> uhm ...
20140707 17:19:57 <hauer> How do I specify what program to track?
20140707 17:20:10 <hauer> seems like I have to launch my java program from command line
20140707 17:20:14 <rmk0> yeah, you do
20140707 17:20:28 <hauer> urgh I have done this ... once ...
20140707 17:20:36 <rmk0> is an eclipse limitation
20140707 17:20:42 <hauer> I better export a .jar of my project then
20140707 17:23:52 <hauer> so ... I now need to call
20140707 17:24:08 <hauer> qapitrace.exe trace java -jar C:/Loc To My Jar ?
20140707 17:24:21 <rmk0> just apitrace.exe, not qapitrace.exe
20140707 17:24:51 <rmk0> "apitrace" produces the trace file, "qapitrace" examines existing traces
20140707 17:26:02 <hauer> error: failed to execute "java -jar C:\Users\Hauer\tester.jar"
20140707 17:26:07 <hauer> I know I can launch tester.jar
20140707 17:26:28 <rmk0> hm
20140707 17:27:00 <hauer> "java -jar C:\Users\Hauer\tester.jar"
20140707 17:27:05 <hauer> needs to be in quotes, right?
20140707 17:27:13 <rmk0> doubt it
20140707 17:27:30 <hauer> ok again without quotes
20140707 17:27:57 <hauer> error: you need to use the x64 ... urgh
20140707 17:28:00 <hauer> okay try again
20140707 17:28:11 <rmk0> hehe
20140707 17:28:29 <rmk0> one day the world will be dragged kicking and screaming over x86_64
20140707 17:28:36 <rmk0> we can forget this whole mess ever happened
20140707 17:29:11 <hauer> okay
20140707 17:29:37 <hauer> I got a huge lot of warnings
20140707 17:29:44 <hauer> "unkown function glFoo"
20140707 17:29:48 <rmk0> yeah, it'll do that
20140707 17:30:06 <hauer> warning: caught exception 0x00000005
20140707 17:30:30 <hauer> Well
20140707 17:30:32 <rmk0> assume the program does actually run?
20140707 17:30:34 <hauer> now I got a java.trace file
20140707 17:30:42 <hauer> yes the program ran and rendered
20140707 17:30:47 <hauer> not into the frame buffer
20140707 17:30:48 <rmk0> qapitrace.exe java.trace (or open it from the menu, if you prefer)
20140707 17:31:21 <hauer> okay 2000 frames
20140707 17:31:25 <rmk0> right
20140707 17:31:26 <hauer> 58 calls each
20140707 17:31:36 <rmk0> no doubt 1999 of those are identical
20140707 17:31:59 <rmk0> jogl performs a mass of opengl calls in the very first frame, usually, so i'd pick the frame after that
20140707 17:32:33 <hauer> 18000 calls in frame 0 ^^
20140707 17:32:37 <rmk0> yep
20140707 17:32:40 <hauer> 58 calls after that each frame
20140707 17:32:42 <hauer> yap
20140707 17:32:45 <hauer> that is my code
20140707 17:33:00 <rmk0> you should be able to double click on individual function calls, and it'll replay the program up to that call
20140707 17:33:12 <rmk0> you can inspect shaders, textures, etc, in the right pane
20140707 17:34:09 <hauer> ok so I double click on my first glDrawElements
20140707 17:34:51 <hauer> Even the shader with comments is visible
20140707 17:35:00 <hauer> but where do I find my framebuffer
20140707 17:35:11 <hauer> There is only my texture of my single sprite bound ofc.
20140707 17:35:14 <rmk0> there should be a "surfaces" tab
20140707 17:35:26 <hauer> Only 1 texture
20140707 17:35:45 <hauer> Okay wait
20140707 17:35:49 <hauer> when I use a framebuffer
20140707 17:36:09 <hauer> do I need to bind the render target to a texture?
20140707 17:36:32 <rmk0> you should specifically not do that
20140707 17:36:41 <rmk0> the opengl spec calls it "feedback"
20140707 17:37:03 <rmk0> like... you can't render to a texture and also [bind and] sample from that texture during rendering
20140707 17:37:26 <hauer> http://pastebin.com/aYcUVywD
20140707 17:37:32 <hauer> It is not the same texture
20140707 17:37:36 <hauer> but another texture
20140707 17:37:44 <hauer> one that I simply read from
20140707 17:37:50 <hauer> to render stuff
20140707 17:38:18 <rmk0> not sure what you're asking there
20140707 17:39:41 <rmk0> the rule is just "don't have a texture bound to a texture unit if you're also rendering to that texture via a framebuffer object"
20140707 17:39:44 <rmk0> anything else is safe
20140707 17:39:54 <hauer> I created texture A , bound that to the framebuffer, then unbind texture A, bind texture B, use texture B to render to texture A with the framebuffer bound
20140707 17:40:03 <rmk0> yeah, that's fine
20140707 17:40:08 <hauer> okay
20140707 17:40:10 <hauer> good
20140707 17:40:33 <hauer> now the only wierd thing is that it seems like only one texture exists there
20140707 17:41:40 <rmk0> in the surfaces tab, do you see "Textures" and "Framebuffers" in the table?
20140707 17:41:47 <hauer> Ah here
20140707 17:41:52 <hauer> after I rendered to my frame buffer
20140707 17:41:56 <hauer> or "should have"
20140707 17:42:13 <hauer> and then step forward to the point where I bind the "rendered to" texture
20140707 17:42:25 <hauer> I can see it
20140707 17:42:28 <hauer> it is bound
20140707 17:42:31 <hauer> but completly empty
20140707 17:42:41 <hauer> There should be my little sprite in there somehow
20140707 17:43:09 <hauer> This is how I render anything to screen
20140707 17:43:10 <hauer> http://pastebin.com/aYcUVywD
20140707 17:43:12 <rmk0> if you step back to just after the glDrawElements call when you're rendering to the framebuffer... did the sprite appear in the framebuffer's color attachment there?
20140707 17:43:41 <hauer> in my first rendering run I did not see the framebuffer
20140707 17:43:50 <hauer> even though it was bound
20140707 17:44:05 <rmk0> that's ... odd
20140707 17:44:13 <rmk0> no framebuffers appeared in the list in the surfaces tab?
20140707 17:44:38 <rmk0> http://waste.io7m.com/2014/07/07/framebuffer.png <- is an example of what i see when rendering to a bound framebuffer
20140707 17:44:51 <rmk0> can see each of the framebuffer's color and depth attachments
20140707 17:45:40 <hauer> okay if I step to the point where I bind 0 to framebuffer
20140707 17:45:43 <hauer> I see my screen
20140707 17:46:47 <hauer> ok
20140707 17:46:49 <hauer> wierd
20140707 17:47:00 <hauer> I now stepped to the point where I definetly see something onscreen
20140707 17:47:12 <hauer> - my sprite rendered directly to the screen for debugg purposes
20140707 17:47:21 <hauer> yet it is not there
20140707 17:47:29 <rmk0> ...
20140707 17:47:50 <rmk0> can you put the trace file online somewhere?
20140707 17:47:53 <rmk0> i can try to replay it here
20140707 17:48:07 <hauer> sure
20140707 17:48:16 <rmk0> traces are self contained, which is pretty helpful... the trace will contain all of your textures and so on
20140707 17:48:31 <hauer> cool
20140707 17:48:53 <rmk0> is useful for when people run into driver bugs in commercial games... they just send apitraces to the driver people
20140707 17:49:10 <rmk0> means the developer doesn't need access to the game to test out the bug
20140707 17:49:45 <rmk0> be back shortly... got to run an errand
20140707 17:50:18 <hauer> Okay, tell me when you are back
20140707 17:50:30 <hauer> cause the file will be deleted after the first person DLs it
20140707 17:57:47 <hauer> okay
20140707 17:58:00 <hauer> if I try to step to the very moment where I create the framebuffer in frame0
20140707 17:58:05 <hauer> qtapitrace breaks
20140707 18:15:29 * Eclesia (~eclesia@anon) has joined #jogamp
20140707 18:15:33 <Eclesia> hi
20140707 18:17:38 <hauer> hi
20140707 18:22:48 * hija (~hija@anon) has left #jogamp
20140707 18:24:54 * rmk0 (~rmk0@anon) Quit (Remote host closed the connection)
20140707 18:28:16 <hauer> OH MY FUCKING GOD I FORGOT TO FLIP THE BUFFER BEFORE glDrawBuffers
20140707 18:33:17 <hauer> great now I have a completly other problem with UV coordinates ...
20140707 18:34:51 <hauer> Is there a way to flip a texture around the horizontal axis ?
20140707 18:35:40 <Eclesia> flip your u coordinate in the buffer or in the frag shader
20140707 18:35:48 <Eclesia> 1-u
20140707 18:37:17 <hauer> The problem is I want to use the same shader to render to the texture and the texture itself
20140707 18:37:40 <hauer> but for some inexplicable reason, when I render the texture again, now it is flipped
20140707 18:38:02 <hauer> possible because I do some very hack-y thing with my coordinates
20140707 19:04:45 <hauer> So ... anyone here who I can talk about coordinates a bit?
20140707 19:06:48 <hauer> or rather ... how do you flip the u coordinate in the buffer?
20140707 19:31:18 <hauer> So anyway, can you guys of jogamp explain to me why the programmer always has to flip the buffers that we need to pass into OpenGL ? I do not need to flip the arrangement of bytes when I pass a reference in C++
20140707 20:26:19 * monsieur_max (~maxime@anon) has joined #jogamp
20140707 20:46:21 * Eclesia (~eclesia@anon) Quit (Quit: Leaving.)
20140707 20:58:19 * hauer (~chatzilla@anon) Quit (Quit: ChatZilla 0.9.90.1 [Firefox 30.0/20140605174243])
20140707 21:03:15 * rmk0 (~rmk0@anon) has joined #jogamp
20140707 21:03:38 <rmk0> well, that took vastly longer than expected
20140707 21:07:55 * rmk0 (~rmk0@anon) Quit (Remote host closed the connection)
20140707 21:11:51 * rmk0 (~rmk0@anon) has joined #jogamp
20140707 21:11:51 * rmk0 (~rmk0@anon) Quit (Changing host)
20140707 21:11:51 * rmk0 (~rmk0@anon) has joined #jogamp
20140707 21:12:07 <rmk0> excuse me... having nasty client problems
20140707 21:39:38 * rmk0 (~rmk0@anon) Quit (Remote host closed the connection)
20140707 21:44:22 * monsieur_max (~maxime@anon) Quit (Quit: Leaving.)
20140707 21:45:47 * rmk0 (~rmk0@anon) has joined #jogamp
20140707 21:46:20 * hauer (~chatzilla@anon) has joined #jogamp
20140707 21:46:26 <hauer> Hi
20140707 21:46:38 <rmk0> lo
20140707 21:50:12 <sgothel> https://jogamp.org/bugzilla/show_bug.cgi?id=1021#c13 <- you may play w/ stereo w/ or w/o a device now :)
20140707 21:51:08 <sgothel> I pushed the 'license critical' code to oculusvr-sdk sub-module .. so we don't violate anything (optional)
20140707 21:51:20 <sgothel> see respective git commit .. etc
20140707 21:54:59 <sgothel> time to open jake2 .. and apply the stuff ..
20140707 21:59:06 <hauer> @rmk0 I solved one problem but found another
20140707 21:59:43 <hauer> http://oi57.tinypic.com/xbbd4h.jpg
20140707 22:00:06 <hauer> That causes that everytime I render my scene to the FBO, the scene is actually flipped
20140707 22:00:36 <hauer> Is there an easy way to flip a texture on the horizontal axis?
20140707 22:01:24 <hauer> except that I draw the whole scene again into another FBO to flip the scene again
20140707 22:01:35 <sgothel> flip texture coordinates (u) -> eclesia mentioned it
20140707 22:02:03 <hauer> That would need modifying the vertex shader
20140707 22:02:13 <sgothel> vertex shader .. you may add a uniform for scaling
20140707 22:02:30 <sgothel> scale-and-offset .. that is
20140707 22:03:07 <hauer> I might add into my uniform block for "environment variables" a flag for "an FBO is bound"
20140707 22:03:16 <sgothel> btw .. this has nothing todo w/ jogl or java ..
20140707 22:03:32 <hauer> Yeah that is open GLs wierd coordinating
20140707 22:03:43 <hauer> I display that in the tinypic :-D
20140707 22:04:34 <sgothel> i don't see why changing the rendertarget to FBO is any different .. it is not
20140707 22:04:41 <hauer> Well
20140707 22:04:58 <sgothel> maybe you forgot to set the viewport
20140707 22:05:03 <hauer> Every Texture that get's loaded from a .png is actually upside down
20140707 22:05:08 <sgothel> or reshape your matrices
20140707 22:05:16 <hauer> (I don't use matrices)
20140707 22:05:23 <sgothel> not - if you use our PNG loader
20140707 22:05:38 <sgothel> the new default if using TextureIO
20140707 22:05:52 <hauer> how new?
20140707 22:06:07 <sgothel> the produced texture-coordinates reflect the image orientation always
20140707 22:06:19 <hauer> I wrote my texture loading code with java's image IO stuff about a year or two ago
20140707 22:06:33 <sgothel> not so new .. but I have seen folks using AWTTexture* .. which uses AWT's .. and that must be flipped :)
20140707 22:06:44 <hauer> :-P
20140707 22:06:46 <sgothel> yeah .. that must be flipped
20140707 22:06:57 <sgothel> use ours .. it's using PNGJ .. much faster
20140707 22:07:22 <hauer> Well loading a texture into memory is not that time critical ...
20140707 22:07:27 <sgothel> also - we use our JPEG decode .. also faster and GL oriented compared to AWT
20140707 22:07:51 <sgothel> whatever .. for us, it's all important - mostly: being platform agnostic
20140707 22:08:04 <hauer> true, true
20140707 22:10:08 <hauer> So many functions in TextureIO ...
20140707 22:10:22 <sgothel> @All, Harvey, Xerxes: Would be nice to enhance the new stereo stuff .. needs more 'experience'
20140707 22:11:13 <sgothel> look at the many unit tests using it: eclipse call trace .. or 'find src -iname \*PNG\*' 'find src -iname \*JPEG\*'
20140707 22:12:00 <hauer> Well ... none of those functions look like they can provide the ... very ... very ... very ... basic functionality that I desire ...
20140707 22:12:19 <hauer> aka. pass the GL Object from the Display method and a filename
20140707 22:14:42 <sgothel> @Harvey: 37f76d17cdf90a8dded8beba99651b19a8795c54 really ? (private variable access compiler has to fill in a wrapping access function for the inner
20140707 22:14:42 <sgothel> class to call) .. oh oh .. didn't know
20140707 22:16:06 <sgothel> Q: have to see whether our Eclipse settings are 'compatible' here .. ohoh
20140707 22:17:17 <sgothel> ok in case of DynamicLibraryBundle.loadLibrary() it didn't add the 'private' qualifier - good
20140707 22:23:12 <hauer> Small question: LWJGL obviously "ignores" the display() routine of JOGL , can you get a current GL Context anywhere by calling GLContext.getCurrentGL(); ?
20140707 22:30:38 <hauer> Halleluja, I got your TextureIO to work
20140707 22:31:39 <hauer> Though ... now I think I have a different problem ... all my calculations I ever did regarding texture coordinates is now ... invalid ...
20140707 22:32:13 <sgothel> the produced Texture instance maintains TexCoords
20140707 22:32:35 <sgothel> (they are probably only flipped vertically)
20140707 22:36:07 <hauer> I wanted to provide an easy to understand access to OpenGL for 2D sprite rendering - so the very first course of action was actually allowing the user of my library to "think" in a pixel perfect environment with each and every origin being on the top right of the screen (like in any other environment)
20140707 22:36:48 <sgothel> well, that is just your opinion (top-left origin) :)
20140707 22:36:58 <hauer> urgh yeah ... top left
20140707 22:37:03 <hauer> the other right :-P
20140707 22:37:24 <sgothel> the API should make it easy to flip IMHO
20140707 22:40:01 <hauer> Well if Texture Coordinates work with orgin at the bottom left, then for the application programmer that wants to use a single .png as a sprite atlas , who defines that the frist sprite is from (0,0) to (32,32) - I now need to calculate not from (0,0) to (0.25,0.25) (for example if a sprite atlas has 4x4 32x32 sprites) , but from (0,1) to (0.25,0.75)
20140707 22:40:15 <hauer> Is it actually just 1 - yCoord ?
20140707 22:40:44 <sgothel> since tex-coords range from [0..1] .. yes
20140707 22:40:58 <sgothel> (assuming you do not use TEXTURE_RECTANGLE_2D
20140707 22:41:06 <hauer> Never heared of that
20140707 22:41:21 <sgothel> that is a good thing :)
20140707 22:41:47 <hauer> well up until now my library also contained direct openGL operations only (as to make it easier for me to port to C++ as a sideproject)
20140707 22:42:34 <hharrison> sgothel: yeah, trying to find chapter and verse for you on the inner class access
20140707 22:42:39 <hauer> Using your TextureIO is ... a break in concept though I also only misuse it as a way to get the 5 information I need for my own Texture objects: stored size and actual size as well as the created texture's ID
20140707 22:43:18 <sgothel> then go ahead an re-code PNG decoder .. since TextureIO/TextureData is quite small ..
20140707 22:43:31 * zzuegg (zzuegg@anon) Quit ()
20140707 22:43:33 <sgothel> .. if you get the picture :)
20140707 22:45:45 <hharrison> compiler inserts a package-private method into the outer class to allow access to the inner class
20140707 22:46:30 <hharrison> findbugs has a few false-positives for this rule....I checked these by hand to make sure it was correct
20140707 22:46:42 <sgothel> interesting .. guess I have to revisit some outer-inner issues, and finally install findbugs :)
20140707 22:47:18 <sgothel> I was already wondering today about this .. why can't it access the outer or inner stuff ..
20140707 22:47:23 <sgothel> is that true for vice-versa ?
20140707 22:47:36 <sgothel> i.e. inner static class private method being accessed by outer class ?
20140707 22:47:39 <hharrison> JLS 6.6.1
20140707 22:47:54 <sgothel> thanx!
20140707 22:49:05 <hharrison> I believe in the other direction, the inner class can hide its private fields from the outer class
20140707 22:49:10 <sgothel> http://docs.oracle.com/javase/specs/jls/se7/html/jls-6.html#jls-6.6.1
20140707 22:49:27 <sgothel> but nor the other way around .. good
20140707 22:50:38 <hharrison> Actually, I'm not sure...never tried the other way around, now I have to go look
20140707 22:50:43 <hharrison> :-D
20140707 22:52:18 <hharrison> Looks like private inside the inner class is accessible from the declaring class
20140707 22:52:19 <sgothel> http://jogamp.org/git/?p=jogl.git;a=blob;f=src/jogl/classes/jogamp/opengl/util/stereo/GenericStereoDevice.java;h=d7fb95d91d11c2c6eca0faac9cff0bea6c4d698f;hb=38e51e4a5f6f35c658df10f6d48a33e3ffaea2f3#l144 <- inner private void init()
20140707 22:52:31 <sgothel> http://jogamp.org/git/?p=jogl.git;a=blob;f=src/jogl/classes/jogamp/opengl/util/stereo/GenericStereoDevice.java;h=d7fb95d91d11c2c6eca0faac9cff0bea6c4d698f;hb=38e51e4a5f6f35c658df10f6d48a33e3ffaea2f3#l332 <- outer usage
20140707 22:52:38 <sgothel> phew :)
20140707 22:52:42 <hharrison> _but_
20140707 22:53:13 <hharrison> at a bytecode level, the compiler is having to insert package-private wrappers into the outer or inner class to allow the access
20140707 22:53:43 <hharrison> As from the JVM perspective, they are totally separate classes in the same package
20140707 22:53:46 <sgothel> http://docs.oracle.com/javase/specs/jls/se7/html/jls-6.html#jls-6.6.1 <- 'wrapper' not found
20140707 22:53:47 <hharrison> neat!
20140707 22:53:50 <sgothel> wrong doc ?
20140707 22:53:57 <hharrison> That defines what is allowed
20140707 22:54:14 <sgothel> good .. great heads up
20140707 22:54:15 <hharrison> I'm tyring to find a definitive article about the mechanism
20140707 22:54:33 <sgothel> now need to burn this rule in my head .. and find all issues :)
20140707 22:54:44 <hharrison> essentially Class and Class$Inner are treated as totally distinct by the JVM
20140707 22:55:08 <hharrison> so the compiler inserts package-private shims as needed when these accesses are made
20140707 22:55:10 <sgothel> yeah, knew that .. but thought the whole access thing is like 'decoration' for both :)
20140707 22:56:55 <sgothel> http://docs.oracle.com/javase/specs/jls/se7/html/index.html <- doesn't seem to be explained in this document ..
20140707 22:57:00 <hharrison> I think the JVM actually has private as part of verification, has to be correct
20140707 22:57:07 <hharrison> or the bytecode won't validate
20140707 22:57:24 <hharrison> otherwise malicious bytecode could do whatever it wanted
20140707 22:57:48 <sgothel> surely makes sense ..
20140707 22:57:53 <hharrison> (guessing now, not totally sure here)
20140707 22:58:01 <sgothel> had to add those wrappers for a few unit tests myself ..
20140707 22:58:02 <hharrison> But I'm relatively sure
20140707 22:59:18 <hharrison> weak...but best I've seen yet (and now I know WTF synthetic is all about finally
20140707 22:59:20 <hharrison> http://www.javaworld.com/article/2073578/java-s-synthetic-methods.html
20140707 22:59:37 <hharrison> "The Java compiler must create synthetic methods on nested classes when their attributes specified with the private modifier are accessed by the enclosing class. The next code sample indicates this situation."
20140707 22:59:53 <hauer> Yes! It all actually just involved flipping the y axis!
20140707 23:00:01 <hauer> Even my bitmap font util works perfectly
20140707 23:00:20 <hauer> Give eclasia my regards!
20140707 23:02:19 <hauer> need some much deserved sleep
20140707 23:02:21 <hauer> cya
20140707 23:02:25 * hauer (~chatzilla@anon) Quit (Quit: ChatZilla 0.9.90.1 [Firefox 30.0/20140605174243])
20140707 23:04:45 <sgothel> http://findbugs.cs.umd.edu/eclipse .. installing it :)
20140707 23:05:14 <hharrison> have fun....give your eclipse plenty of headpspace
20140707 23:05:34 <hharrison> I bump mine up to -Xmx2048 or 4096
20140707 23:05:47 <hharrison> 2048m or 4096m
20140707 23:06:06 <sgothel> 4k would be a bit tight :)
20140707 23:07:06 <sgothel> from 1G -> 4G .. lets see
20140707 23:10:31 * hharrison (~chatzilla@anon) Quit (Remote host closed the connection)
20140707 23:35:00 * hharrison (~chatzilla@anon) has joined #jogamp
20140707 23:53:42 <sgothel> @Harvey: Can't get the private-access thing show up .. hmm
20140707 23:54:02 <sgothel> FB 3.0.0
20140707 23:54:22 <sgothel> (release)
20140708 00:02:30 <hharrison> I'm on a 2-based one...lemme go check if it moved
20140708 00:04:16 <hharrison> I have it in the 2.0 menu -> Detector configuration -> InefficientMemberAccess (had to turn on hidden detectors)
20140708 00:04:33 <hharrison> due to the occasional false-positive for that detector I think
20140708 00:05:14 <hharrison> Oh..._3.0_, that's new
20140708 00:06:02 <sgothel> InefficientMemberAccess <- enabled, still not hitting there, well ..
20140708 00:06:51 <hharrison> (running on a tree with my patches already applied?)
20140708 00:07:03 <sgothel> yup
20140708 00:07:16 <sgothel> .. well, just on jogl .. found some issues - good :)
20140708 00:07:56 <sgothel> had to filter out our 'passing mutable object' .. performance ..
20140708 00:08:11 <hharrison> yeah, jogl is noisy
20140708 00:08:28 <sgothel> and it didn't detect that one type was immutable (all fields final) ..
20140708 00:08:33 <hharrison> I look through for likely categories, then try to work the whole category before going further
20140708 00:08:47 <sgothel> nonetheless .. a nice protocol for review
20140708 00:09:01 <sgothel> brb .. 30min ..
20140708 00:09:40 <sgothel> uh .. good night - better sleep now .. laters
20140708 00:09:48 <hharrison> night!
20140708 05:05:30 -jogamp- Continue @ http://jogamp.org/log/irc/jogamp_20140708050530.html