![](/img/trans.png)
[英]Is there a way to find whether theuser is using Wayland instead of X11, WITHOUT enviroment variables? (C)
[英]Where could I get EGL headers on a CentOS machine without X11/Wayland installed with NVIDIA GPU?
我從NVIDIA https://devblogs.nvidia.com/egl-eye-opengl-visualization-without-x-server/找到了一個有關無頭OpenGL的博客,但是我的機器上沒有任何egl.h。 我嘗試從https://www.khronos.org/registry/EGL/下載egl.h,但是egl.h取決於eglplatform.h,而后者取決於X11:
#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__)
我聽說過台面,但我懷疑它的eglplatform.h與NVIDIA驅動程序的實現是否兼容。 如何在計算機上使用EGL?
我通過從修補程序https://bugs.chromium.org/p/angleproject/issues/attachment?aid=293029&signed_aid=DKkje7OQxO9ql6Tun8a15Q==復制標題來解決了這個問題。 Mesa的標頭也應該沒問題,因為我根本不會使用任何與窗口相關的功能。 我需要做的只是編譯我的源文件。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.