alfredng 发表于 2022-8-22 11:04:27

rk3568 egl 工作不正常

我写了一个测试程序
```
#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;
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);
if (eglDpy==EGL_NO_DISPLAY)
{
    printf("Detecteddevices\n");
}

// ...
return 0;
}

```
我发现eglQueryDevicesEXT(MAX_DEVICES, eglDevs, &numDevices); 崩溃,这个是什么问题,是不是rk不支持直接egl这样用?在电脑和非rk平台都是正常的
页: [1]
查看完整版本: rk3568 egl 工作不正常