Spaces:
Runtime error
Runtime error
File size: 4,907 Bytes
325bfe1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
Ticket Name: TDA4VM: porting hardware surround view interface to app_srv_camera demo display unexpect Query Text: Part Number: TDA4VM Other Parts Discussed in Thread: TDA2 porting hardware surround view interface to app_srv_camera demo display unexpect Dear expert, I porting my surround view interface into app_srv_camera demo, add my init interface to tivxGlSrvCreate, which need 3 paramters (display, surface, context), replace render_renderFrame with my UpdataApp interface for doing surround view function, in my interface, there are create serval framebuffers use glGenFramebuffer, and when the app run, call glBindFramebuffer bind texture to each framebuffer, then glBindFramebuffer (GL_FRAMEBUFFER, 0) render all the contents to the window provided framebuffer, now on tda4vm linux sdk, because the surface is null, I don't know where the display content store and how to get it when do glBindFramebuffer (GL_FRAMEBUFFER, 0) . In tivxGlSrvProcess, I found appEglBindFramebuffer call glBindFramebuffer bind the display buffer , so I modify my UpdataApp interface , delete all glBindFramebuffer code line, after do that I can see one part of my materials dispaly on screen . my question: 1) if tda4vm can create surface for render, how to do it, I try to call eglCreatePbufferSurface to create it , but it failed 2) if can't create surface, how to modify my interface for dispaly all the materials or how to get the content buffer after render finish. sdk vision: 07_03_00_07 OS: Linux Thanks! Responses: Hello, In case of TI's TDA4 surround view implementation, the display is controlled using R5 and the OpenVX display node abstracts this out. Look at vision_apps/utils/opengl/src/a72/app_gl_egl_utils_linux.c. There is a function to create render surface/texture from a pre-allocated dmabuf - appEglWindowCreateIMG. This function basically takes a dmabuf fd and creates an EGL Image that can be rendered to. This is used as a frame buffer in appEglBindFrameBuffer (in the same file). You can follow the same procedure. What are you trying to do in your use case? Do you need to send your GPU rendered buffer to R5 display? You can also look at a simpler example - vision_apps/apps/basic_demos/app_linux_arm_opengl_mosaic Regards Hemant Thanks! Yes, I need to send my GPU rendered buffer to R5 dispaly, but I don't know how to do it, I try to use glReadPixel read my gpu output to output_target_ptr, but it failed and return 0x506 error report. As you discribe I follow app_gl_egl_utils_linux.c , use the same procedure, in my own case which run on tda2 before, which need input 4 camera capture frames and load some other materials, then do surround view function and display the output render buffer. hi, expert As my described, my function interface have many materials and textures need scale/render to one surface, It's hard for me modify the process flow, so I want to create a surface with pbuffer which can pass to function interface or use a opengl interface like glReadPixel copy the output buffer to display buffer. This problem bothered me for a long time, I need you help. Thanks! Hello, glReadPixels should work - not sure why you are seeing that error. Can you please review all the arguments and make sure they are okay? But please know that glReadPixels may have a performance hit - but should certainly get you the required data. As I mentioned in my previous post, app_linux_arm_opengl_mosaic shows how to handle GPU to display. Regards Hemant Thanks for your reply! I am already reference the app_linux_arm_opengl_mosaic demo, I modified my program, replace the function code call glBindFramebuffer (GL_FRAMEBUFFER, 0) to glBindFramebuffer (GL_FRAMEBUFFER, disp_fb), then call glFramebufferTexture2D bind the texture need render to current framebuffer, but there are some errors arised, This is the log ### glCheckFramebufferStatus not completed! status 36054 GL: after eglSwapBuffers() glError (0x506) If I deleted glFramebufferTexture2D , no error log print out, but there is also no display. If I keep call glBindFramebuffer (GL_FRAMEBUFFER, 0) in my app, the glCheckFramebufferStatus also report error, is't means there is no default framebuffer ? hello: I did some test of that , when glBindFramebuffer(GL_FRAMEBUFFER, 0) glCheckFramebufferStatus return 0x8219 which GL_FRAMEBUFFER_UNDEFINED, so EGL_NO_SURFACE which means no default framebuffer, so I call glBindFramebuffer (GL_FRAMEBUFFER, fboid) and glFramebufferTexture2D , fixed some bugs of my app, glCheckFramebufferStatus return ok, and I can see some color output to my screen(but not correct), I think this is because my default render flow not suitable the new draw flow。 I know on tda4vm QNX can create a surface with buffer, which can pass to my app, so there is't need modify the render flow. so my question is can I create a surface with a buffer on linux? resolved! please close it! |