Some Problems and Solutions encountered when using ndk for 3D effects on Android

Source: Internet
Author: User

When I honestly follow 3D practices, the 3. X and 4. x platforms are both good, with the same effect as I imagined.
2.3 there will be a layer coverage problem above. After setting the background of glsurfaceview transparent, it will be fine.
On the 2.2 page, the screen is displayed in white. I tried it, mainly because the image width and height of the texture must be 2 to the Npower.

Some engines handle this problem internally. For example, if you input a 48*59 graph, the engine will help you make it into a 64*64 graph and then only render the part of 48*59.

Supplement:

Run the 3D file written by ndk for the first time in a process.CodeThe entire screen is black for half a second, and there is no result after several days. This problem also occurs when you take out the San-* That comes with ndk. By accident, I mentioned that two colleagues said they could set a transparent topic for the application. Sure enough, the problem is solved.
1. Add a style
<Style name = "background">
<Item name = "Android: windowbackground"> @ color/transparent </item> <! -- Transparent background -->
</Style>
2. Set a topic for the activity
Android: theme = "@ style/background"

Related Article

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.