|
【Linux】
rk3568 egl 工作不正常
发表于 2022-8-22 11:04:27
浏览:4668
|
回复:0
打印
只看该作者
[复制链接]
楼主
我写了一个测试程序
```
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include <stdio.h>
int main(int argc, char const *argv[])
{
printf("aaa\n");
static const int MAX_DEVICES = 1;
EGLDeviceEXT eglDevs[MAX_DEVICES];
EGLint numDevices;
printf("bbb\n");
PFNEGLQUERYDEVICESEXTPROC eglQueryDevicesEXT =
(PFNEGLQUERYDEVICESEXTPROC)
eglGetProcAddress("eglQueryDevicesEXT");
printf("ccc\n");
eglQueryDevicesEXT(MAX_DEVICES, eglDevs, &numDevices);
printf("Detected %d devices\n", numDevices);
PFNEGLGETPLATFORMDISPLAYEXTPROC eglGetPlatformDisplayEXT =
(PFNEGLGETPLATFORMDISPLAYEXTPROC)
eglGetProcAddress("eglGetPlatformDisplayEXT");
void *eglDpy = eglGetPlatformDisplayEXT(EGL_PLATFORM_DEVICE_EXT,
eglDevs[0], 0);
if (eglDpy==EGL_NO_DISPLAY)
{
printf("Detected devices\n");
}
// ...
return 0;
}
```
我发现eglQueryDevicesEXT(MAX_DEVICES, eglDevs, &numDevices); 崩溃,这个是什么问题,是不是rk不支持直接egl这样用?在电脑和非rk平台都是正常的
|
|