[Mesa-dev] EGL and glClear(): Nothing is drawn on screen

Eric Anholt eric at anholt.net
Tue Apr 9 14:42:11 PDT 2013


Ralf Jung <post at ralfj.de> writes:

> Hi list,
>
> first of all, sorry if this is the wrong list for my issue. I tried
> various IRC channels, but got no reply, and since I am not actually sure
> there is a bug here, I decided to write to a list instead of filing a
> bugreport.
>
> My issue is as follows: I wrote a simple GL application which makes it
> easy to see tearing. All it does is
> * call glClear()
> * draw a vertical box as quad
> * swap the buffers
> * call glFlush()
> I wrote it in a way that I can compile it to use either GLX or EGL.
> Everything works fine with GLX, but using literally the same code
> (except for the initialisation and buffer swap, of course), it does not
> work in EGL. Instead of drawing the box, the window stays black. If I
> draw a black quad all over the screen instead of calling glClear(), it
> works fine even with EGL. I am very new to GL, but from my
> understanding, above code should work fine - is there a problem with my
> program, or is this a bug in EGL?
> You can find the sample program at http://www.ralfj.de/git/gltest.git .
> The default behaviour is as described above, calling it with "-o" uses a
> black quad instead of glCear().

If you were testing with front buffer rendering, GLES doesn't support
front buffer rendering (because nobody should ever use it).  I recommend
using a debug build of mesa when developing GL applications, since it
dumps GL error messages to the console by default.

If it was in the double-buffered path, then I don't have any other info.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130409/f233ec2b/attachment.pgp>


More information about the mesa-dev mailing list