File tree Expand file tree Collapse file tree
native/cocos/renderer/gfx-gles2 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,14 +66,14 @@ void *gles2wLoad(const char *proc) {
6666}
6767#else
6868 #include < dlfcn.h>
69- #include " BasePlatform.h"
7069 #include " ../gfx-gles-common/eglw.h"
7170 #include " ../gfx-gles-common/gles2w.h"
71+ #include " BasePlatform.h"
7272
7373namespace {
74- void *libegl = nullptr ;
75- void *libgles = nullptr ;
76- }
74+ void *libegl = nullptr ;
75+ void *libgles = nullptr ;
76+ } // namespace
7777
7878bool gles2wOpen () {
7979 libegl = dlopen (" libEGL.so" , RTLD_LAZY | RTLD_GLOBAL);
@@ -103,12 +103,18 @@ bool gles2wClose() {
103103void *gles2wLoad (const char *proc) {
104104 void *res = nullptr ;
105105 if (eglGetProcAddress) res = reinterpret_cast <void *>(eglGetProcAddress (proc));
106+
107+ #if CC_PLATFORM != CC_PLATFORM_OPENHARMONY
106108 auto sdkVersion = cc::BasePlatform::getPlatform ()->getSdkVersion ();
107109 if (sdkVersion <= 23 ) {
108110 if (!res) res = dlsym (libgles, proc);
109111 } else {
110112 if (!res) res = dlsym (libegl, proc);
111113 }
114+ #else
115+ if (!res) res = dlsym (libegl, proc);
116+ #endif
117+
112118 return res;
113119}
114120#endif
You can’t perform that action at this time.
0 commit comments