简体   繁体   English

使用OpenGL(libGL.so)和EGL上下文

[英]Using OpenGL (libGL.so) with EGL context

As far as I know, GLES (libGLES) can work on EGL context and OpenGL (libGL.so) can work on GLX context. 据我所知,GLES(libGLES)可以在EGL上下文中工作,而OpenGL(libGL.so)可以在GLX上下文中工作。

Is it possible to use openGL functions in libGL.so with EGL context? 是否可以在libGL.so中使用带有EGL上下文的openGL函数?

Or is there any theoretical or practical reason that this can not be done without big effort? 或者是否存在任何理论或实际原因,如果不付出巨大努力就无法做到这一点?

I'm considering the Intel HD graphics, so I can build libGL.so and libEGL out of MESA source code. 我正在考虑英特尔高清显卡,所以我可以用MESA源代码构建libGL.so和libEGL。

Is it possible to use openGL functions in libGL.so with EGL context? 是否可以在libGL.so中使用带有EGL上下文的openGL函数?

In principle: 原则上:

eglBindAPI() : eglBindAPI()

EGLBoolean eglBindAPI(EGLenum api);

... ...

If api is EGL_OPENGL_API , the current rendering API is set to the OpenGL API . 如果apiEGL_OPENGL_API ,则将当前呈现API设置为OpenGL API

But note: 但请注意:

EGL_BAD_PARAMETER is generated ... if the specified client API is not supported by the EGL implementation. 生成EGL_BAD_PARAMETER ...如果EGL实现不支持指定的客户端API。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM