Add __bridge

This commit is contained in:
Duy Tran Khanh committed 2020-12-31 19:53:29 +07:00
1 parent 538270402e
commit ffaeb9d263
1 file changed
+2 -2
+2 -2
View File
@@ -42,7 +42,7 @@
#endif
void *createContext() {
return (void *) [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2];
return (__bridge void *) [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2];
}
void *getCurrentContext() {
@@ -52,7 +52,7 @@ void *getCurrentContext() {
jboolean makeCurrentContext(void *context) {
// fprintf(stderr, "IOSWindowSystemInterface : makeCurrentContext %x\n", context);
if ([EAGLContext setCurrentContext:(EAGLContext *)jlong_to_ptr( context)] == YES) {
if ([EAGLContext setCurrentContext:jlong_to_ptr((__bridge EAGLContext *) context)] == YES) {
return JNI_TRUE;
}