The sample code describes how to use OpenGL Smart Cache.
Main APIs in sample code:
-
Query supported extensions:
glGetString():query if the device support OpenGL Smart Cache. -
Add Smart Cache flags:
glTexImage2D() or glTexStorage2D():Add Smart Cache Flag when applying for memory.
See details:HUAWEI HMS Core
To build the sample, import the sample to Android Studio (3.x +).
- Devices released after P40 or devices with more advanced chip than Kirin 990.
- Devices with Android 10.1 or later
The sample of OpenGL Smart Cache has obtained the Apache 2.0 license.