Differences rendering a gradient using a FBO in GLES2 and GLES3

223 views Asked by At

I'm using JOGL as part of a cross platform app. I'm requesting a GLES2 GL profile to be used.

I've got a FBO bound and content drawn into it, before unbinding it & drawing the backing texture to the screen - pretty standard draw-to-texture stuff.

I've got 3 different types of drawing I've tested so far, block colour shader, gradient shader, and a texture shader. All of these are working thus far when drawn into the default frame buffer across all devices.

Hardware involved in tests:

Linux laptop: Renderer: Mesa DRI Intel(R) Sandybridge Mobile. Version: OpenGL ES 3.0 Mesa 10.1.3. GL Profile: GLProfile[GLES2/GLES3.hw].

Android Samsung Galaxy S3: Renderer: Mali-400 MP. Version: OpenGL ES 2.0. GL Profile: GLProfile[GLES2/GLES2.hw].

Android Samsung Tab 4: Renderer: Mali-T628. Version: OpenGL ES 3.0. GL Profile: GLProfile[GLES2/GLES3.hw].

When testing rendering to texture using the FBO, I'm getting some very odd behaviour with the gradient shader only, and only on the Galaxy tab 4. What happens is I don't get any visual result back from drawing the content of the FBO, not even the clear colour I used to clear the FBO before drawing the gradient into it - and as I said the gradient does work under all other circumstances.

Furthermore, the Galaxy tab 4 gives the same correct consistant results if I draw a block colour shader or texture into the FBO & then draw the FBO content to the default frame buffer.

So the big question is - why doesn't the gradient draw into the FBO work on the tab 4? My only hunch is it's something to do with the GLES3 implementation on the Tab 4 regarding frame buffers, but I'm at a loss of where to go from here.

Whereas the Galaxy S3 uses GLES2 and a normal GL_FRAMEBUFFER component, the Tab 4 is running GLES3 and uses a GL_DRAW_FRAMEBUFFER and a GL_READ_FRAMEBUFFER - but remember it's fine drawing a block colour or texture into the FBO, only the gradient doesn't show up. Like I said, odd..

Thanks for reading.

0

There are 0 answers