Hi,

> > +    egl_dbg("eglInitialize ...\n");
> > +    b = eglInitialize(qemu_egl_display, &major, &minor);
> > +    if (!b) {
> > +        fprintf(stderr, "egl: eglInitialize failed\n");
> > +        return -1;
> > +    }
> 
> Should we care for eglTerminate() after this point (on error) or do we 
> just assume there's no hope on failure anyway?

Currently qemu will exit() on failure anyway.

> > +    egl_dbg("eglChooseConfig ...\n");
> > +    b = eglChooseConfig(qemu_egl_display,
> > +                        gles ? conf_att_gles : conf_att_gl,
> > +                        &qemu_egl_config, 1, &n);
> 
> Well... It would be sad if the system actually supported true color 
> (like basically any system everywhere) and we get some 5/6/5 
> configuration here (or even worse).

I'd expect the system to simply return the best config here ...

> (5/6/5 for R/G/B bit sizes).

Fixed that.

> > +        fprintf(stderr, "egl: eglCreateContext failed\n");
> > +        return NULL;
> > +    }
> > +
> > +    b = eglMakeCurrent(qemu_egl_display, EGL_NO_SURFACE, EGL_NO_SURFACE, 
> > ectx);
> 
> What is this call for? So that some rudimentary OpenGL operations can be 
> executed which don't need access to a framebuffer?

Yes.

Saw this in sample code:  First make context active without surface,
then create surface, then make context active again, this time with the
fresh created surface.

Which made me think it is probably a good idea to make the new context
active even without surface.

cheers,
  Gerd



Reply via email to