Reputation: 11
I am developing an C++ application on QNX 7.0. In the application, I want to render a basic cube via OpenGL ES 3 and display it using OpenWFD API. For QNX, native windowing system is provided via screen API, however, in my case, I am not able to use it. I have access to OpenWFD API and can display content on my screen. I can also draw a cube via OpenGLES. However, I cannot find an efficienty way to pass the OpenGLES rendering output to OpenWFD api for displaying the rendered content.
Is there any way for this kind of architecture to work?
Up to now, I tried some methods listed below:
I created an EGLImage via OpenWFD API ( wfdCreateWFDEGLImages(...) ), then feed the EGLImageHandle to OpenGLES as Renderbuffer storage using glEGLImageTargetRenderbufferStorageOES(...) funtion. However, it returns GL_INVALID_OPERATION.
I created a framebuffer and renderbuffer(for off-screen rendering in OpenGLES), create an EGLImage from renderbuffer using EGL API ( eglCreateImage(...) ). Then try to create WFDSource from this EGLImage to be able to bind it to WFD Pipeline. However, wfdCreateSourceFromImage(...) function returns NULL for WFDSource.
I tried to create a wfdwindow using the following struct definitions, and try to create an EGL surface by using this wfdWindow. However, eglCreateWindowSurface(...) gives error and does not accept the wfdWindow I provided.
typedef struct wfd_buffer {
WFD_EGLImageType* image;
WFDSource source;
} wfd_buffer_t;
typedef struct wfd_window {
WFDDevice dev;
WFDPort port;
WFDPipeline pipeline;
unsigned int numBuffers;
wfd_buffer_t buffers[MAX_NUM_OF_WFD_BUFFERS];
} wfd_window_t;
I tried to query wfd devices via EGL API ( eglQueryDevicesEXT(..) ), however this extension is not available for me to use.
Upvotes: 0
Views: 511
Reputation: 11
Ideally on QNX you'd use QNX Screen for displaying any OpenGL/GLES related content but IIUC you're not able to use QNX Screen in your usecase.
The OpenWFD drivers on QNX are primarily meant to be used solely by QNX Screen and may support creating WFDSource handles only from QNX Screen specific image objects and not from EGLimages.
The exact details of which buffer objects are supported for creating WFDSource handles from depends on the vendor of the OpenWFD driver so I'd suggest contacting the vendor of the OpenWFD driver you're using for inputs here.
Upvotes: 1