相关疑难解决方法(0)

EGLD上的EGLD显示

我想通过EGL创建一个OpenGL上下文.由于我实际上不会绘制,我想将Pbuffers与GBM平台结合使用.这是代码(C99):

#include <stdlib.h>
#include <assert.h>

#include <fcntl.h>
#include <unistd.h>

#include <EGL/egl.h>
#include <EGL/eglext.h>

#include <gbm.h>


int main( void )
{
    assert( eglBindAPI( EGL_OPENGL_API ) == EGL_TRUE );

    int fd = open("/dev/dri/card0", O_RDWR);
    struct gbm_device * gbm = gbm_create_device( fd );

    EGLDisplay dpy = eglGetDisplay( gbm );
    eglInitialize( dpy , NULL , NULL );

    EGLConfig config;
    EGLint n_of_configs;
    assert( eglGetConfigs( dpy , &config , 1 , &n_of_configs ) == EGL_TRUE );

    EGLSurface srf = eglCreatePbufferSurface( dpy , config , NULL ); …
Run Code Online (Sandbox Code Playgroud)

c mesa egl

7
推荐指数
1
解决办法
4366
查看次数

标签 统计

c ×1

egl ×1

mesa ×1