hello everyone ,i has a problem ,that when i display one frame in a thread,find that there will be cost a large time.
when eglmakecurrent(display , null , null .....).
i do it in a thread timer , call it by 40ms.
is anyone have the same problem,can you help me ,thank you !
eglmakecurrent is so slowly in android
hello everyone ,i has a problem ,that when i display one frame in a thread,find that there will be cost a large time.
when eglmakecurrent(display , null , null .....).
i do it in a thread timer , call it by 40ms.
is anyone have the same problem,can you help me ,thank you !
Don't do it every frame. (As long as its always the same thread executing the rendering you only have to call it once)
i have tryed just do once,it is run.but i need render one frame to two window. so i must eglmakecurrent(display , null , null .....).when render one frame is end.
and it is not happened in ios, it is odd
and it is not happened in ios, it is odd
I can't say for sure that this will work on Android, but you could try to handle this by running two threads, making once context current on each at initialization, and synchronizing them so they do not attempt to draw at the same time (via a semaphore). That should avoid the eglMakeCurrent overhead, and synchronization should minimize pipeline stalls due to rendering from separate threads. Do not try to draw from both at the same time, as that will cause a great deal of slowdown.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement