COCOS2DX uses spine skeletal animations to cause a solution to the iphone6s, Iphone7 true machine flash-back

Source: Internet
Author: User
In the COCOS2DX 3.x release, in some cases the use of spine skeletal animations and layercolor may result in iphone6s, and Iphone7 on the true machine, other models normal, Xcode debugging found to be in Layercolor::o Ndraw gldrawarrays (Gltriangle_strip, 0, 4) This method crashes, online to find a solution for foreign developers, after testing is indeed available. (Foreign solution original address: https://github.com/cocos2d/cocos2d-x/issues/16543) Solution: 1, find Polygonbatch::flush this method; 2, will:
Gl::bindvao (0);
Glenablevertexattribarray (glprogram::vertex_attrib_position);
Glenablevertexattribarray (Glprogram::vertex_attrib_color);
Glenablevertexattribarray (glprogram::vertex_attrib_tex_coords);

To be replaced by:
Gl::enablevertexattribs (Gl::vertex_attrib_flag_position | Gl::vertex_attrib_flag_color | Gl::vertex_attrib_flag_tex_coord);


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.