Hi,

On Thursday, February 12, 2015, Bryce Harrington <[email protected]>
wrote:

> On Wed, Feb 11, 2015 at 06:15:17PM +0000, Daniel Stone wrote:
> > weston-test uses eglBindWaylandDisplayWL and friends, which are defined
> > either by the EGL implementation, or weston-egl-ext.h as a fallback.
> > Include weston-egl-ext.h from weston-test, so we can build on systems
> > whose native EGL implementation doesn't give us the needed defines.
>
> This sounds sensible, however looking at weston-egl-ext.h, the three
> egl*WL functions appear to get declared only when EGL_EGLEXT_PROTOTYPES
> is defined, and I'm not spotting where that comes in.  I'm sure you're
> correct here, but could you help me connect the dots?
>

The function pointer types (e.g. EGLBINDWAYLANDDISPLAYWLPROC) are declared
unconditionally, to support using eglGetProcAddress, typecasting, and
calling. The bare function definitions are hidden behind a separate
#define, as you are supposed to do extension lookups through GetProcAddress
instead. So there's essentially a define which just lets you be lazy if you
know you can get away with it.

See the core eglext.h for this pattern repeated ad nauseum.

Cheers,
Daniel
_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to