GithubHelp home page GithubHelp logo

Comments (5)

1ace avatar 1ace commented on July 3, 2024

If you're using the headers provided by Mesa, you can use MESA_EGL_NO_X11_HEADERS.

We could push this up to Khronos as a USE_X11; what do you think @oddhack?
I'm on my way home right now, I'll look at this tomorrow.

from egl-registry.

oddhack avatar oddhack commented on July 3, 2024

@1ace if the problem is that the X11 dependency is causing breakage on Apple, maybe the symbol should be opt-in instead of opt-out, so that people not using X11 before don't have to do something extra? That's all I can think of.

from egl-registry.

stonesthrow avatar stonesthrow commented on July 3, 2024

Do this? make section for APPLE with old definition: (Does this work for APPLE/CHROME?)

#elif defined(__APPLE__)

typedef int   EGLNativeDisplayType;
typedef void *EGLNativeWindowType;
typedef void *EGLNativePixmapType;

#elif defined(__unix__)

/* X11 (tentative)  */
#include <X11/Xlib.h>
#include <X11/Xutil.h>

typedef Display *EGLNativeDisplayType;
typedef Pixmap   EGLNativePixmapType;
typedef Window   EGLNativeWindowType;

from egl-registry.

c0d1f1ed avatar c0d1f1ed commented on July 3, 2024

@stonesthrow that basically reverts #43 and thus would work for Chrome but would break Mesa's use of X11 on Mac OS. As noted above there should be an opt-in for that, using a macro like USE_X11.

I checked that on Max OS X __APPLE__ is defined but not __unix__, so we can do:

#elif defined(__unix__) || defined(USE_X11)

/* X11 (tentative)  */
#include <X11/Xlib.h>
#include <X11/Xutil.h>

typedef Display *EGLNativeDisplayType;
typedef Pixmap   EGLNativePixmapType;
typedef Window   EGLNativeWindowType;

#elif defined (__APPLE__)

typedef int   EGLNativeDisplayType;
typedef void *EGLNativeWindowType;
typedef void *EGLNativePixmapType;

The Symbian defines could potentially join the __APPLE__ case again, but I don't think it's worth the risk for the minor saving in lines of code, and it makes things clearer anyway to keep them separate.

from egl-registry.

stonesthrow avatar stonesthrow commented on July 3, 2024

I don't have builds for APPLE or Chrome, So if this is verified, and no objections, we can make the proposed changes - need PR.

from egl-registry.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.