Hi,
I'm currently trying to adapt an OpenGL renderer working on a desktop platform to TDA4.
Since I'm using the TDA4 configured with the display on the R5 processor, I have understood that I need to use an OpenVX DisplayNode to do the actual display.
I have tried to create a simple application runningOpenGL code to try the screen output using as a reference the code of appEglWindow located in vision_apps/utils/opengl/src/a72/app_gl_egl_utils_linux.c.
So my approach is to:
1. Render all objects into an offscreen framebuffer using the same OpenGL code as we have on the standard linux desktop implementation.
2. Extract this framebuffer and create an OpenVX vx_image with its content.
3. Feed the OpenVX image created to an OpenVX display node to perform the actual display.
I'm currently running into EGL and OpenGL errors during runtime:
- OpenGL error 1286 (GL_INVALID_FRAMEBUFFER_OPERATION) after the call to glClear
- EGL error 12301 (EGL_BAD_SURFACE) after the call to eglSwapBuffers
I also have further questions concerning my approach:
- Could you tell me if my approach is correct / feasible ?
- Would you propose another approach to achieve this ? Is there another approach that is more optimized to interact between OpenGL and the actual DisplayNode without having to extract the whole framebuffer ?
- If this approach is correct, could you provide me with some support / examples on how to correctly create the OpenGL framebuffer with EGL on TDA4 and subsequently convert it to a vx_image ?
- Do you have some documentation on the TDA4 implementation and usage of EGL / OpenGLES ?
- I have seen in app_egl_utils that we are using the EGL platform extension "EGL_MESA_platform_surfaceless" on which we are not able to draw pixels to. Should I create a framebuffer manually when this extension is activated ?
CF: I'm using RTOS SDK j721e v8.6.