Jump to content
  • Advertisement
Sign in to follow this  

eglmakecurrent is so slowly in android

This topic is 2062 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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 !

Share this post


Link to post
Share on other sites
Advertisement

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)

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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. Edited by Koehler

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!