Jump to content

  • Log In with Google      Sign In   
  • Create Account


eglmakecurrent is so slowly in android


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 milaoshu1982   Members   -  Reputation: 123

Like
0Likes
Like

Posted 26 September 2012 - 07:57 PM

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 !

Sponsor:

#2 SimonForsman   Crossbones+   -  Reputation: 5450

Like
0Likes
Like

Posted 26 September 2012 - 11:45 PM

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 don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

#3 milaoshu1982   Members   -  Reputation: 123

Like
0Likes
Like

Posted 26 September 2012 - 11:56 PM

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

#4 Koehler   Members   -  Reputation: 228

Like
0Likes
Like

Posted 27 September 2012 - 09:40 AM

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, 27 September 2012 - 09:41 AM.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS