Call to OpenGL es api with no current context in lgame

Source: Internet
Author: User

That, today, the younger brother found another user in an email from a netizen that showedCall to OpenGL es api with no current contextIt is estimated that this problem is quite representative. The younger brother just wanted to find the original post and reply, but it was too difficult to comment on the management after a version of SDN, so he gave up searching for the original post and explained it only in the blog post.

In fact, this call to OpenGL es api with no current context means that the current gles function is not executed in the opengles rendering thread, and the context connection is lost, API call failed (all gles threads in Android are a unique and independent rendering thread, which keeps refreshing in the background, the frame rate or something refers to the number of times he can refresh a second ......).

This problem occurs when some components (or other gles operations) in the lgame are rendered and executed before or after the gles thread refreshes. The key reason is that lgame itself is also a multi-thread, and other threads sometimes "Break the line" with the rendering thread ", therefore, this prompt is possible (that is, when the lgame component calls some functions, the main gles thread has already run or has not run a certain rendering loop, so the call time is incorrect ).

Although the system prompts a gles error, you don't have to worry about it. This will not affectProgramNormal operations (generally, only texture creation and cancellation can cause program exceptions, but this situation has already been protected as necessary ), it can be understood that the Android system prompts you not to do this. In essence, please ignore it. First, such log prompts will not appear very frequently, and then the wrong GL call will usually not get any results. What is terrible ~ (For this reason, it is not worth the candle to restrict component calls separately. In other words, the younger brother once inserted some real machines and stared at log. Nothing was running, and a warning is often displayed when the platform is playing log by itself, error ......).

--------------------

The snow in Beijing yesterday has actually cleared up today. I was still imagining a snowball fight or something, and I was lost (-_-)...... Above.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.