I'm trying to upload dynamically generated picture to the screen with minimal delay, frame by frame. I have used glTexSubImage2D
but it's delay is big. Haven't use PBO because it is not implemented on some devices (requires GLESv3). GraphicBuffer binded to a texture (DMA) is a bit faster, but it downloads the full picture to buffer on every lock() call. Is there a way to upload pixels to the texture (or native window) rapidly without downloading the buffer back? Just for uploading some pixels to the display?
Asked
Active
Viewed 99 times
1

Rabbid76
- 202,892
- 27
- 131
- 174

Twaik Yont
- 102
- 10
-
It sounds like you are trying to render video, so perhaps you've already seen these: https://stackoverflow.com/q/5666513/295004 and http://bigflake.com/mediacodec/ – Morrison Chang Oct 16 '17 at 21:47
-
@morrison-chang That is not for video rendering, but it is almost the same. I'm trying to write OpenGL/Surfaceflinger sink for Xorg, that's why I need solution for realtime uploading pixels to the screen. I need solution where my program could just upload pixel buffer to the screen without any render, frame by frame in realtime. I have read about video streaming but the methods require finished mp4 (or different formats) video file. My friend tried to use glamor driver for rendering, but that's even slower than uploading pre-rendered framebuffer to texture. – Twaik Yont Oct 17 '17 at 06:59
-
Given that GLESv3 is at 63% of Play Store installs (Oct 2, 2017) you might want to consider using PBO - https://developer.android.com/about/dashboards/index.html – Morrison Chang Oct 17 '17 at 08:07