mirror of
https://github.com/shadowfacts/lwjgl2-arm64.git
synced 2026-04-09 00:14:04 +00:00
apply CL/GL interop patch for mac, thx to jaekwon for patch.
This commit is contained in:
parent
ca428342d3
commit
a6fafde5e3
3 changed files with 25 additions and 1 deletions
|
|
@ -38,6 +38,9 @@
|
|||
*/
|
||||
|
||||
#import <jni.h>
|
||||
#import <OpenGL/CGLCurrent.h>
|
||||
#import <OpenGL/CGLTypes.h>
|
||||
#import <OpenGL/CGLDevice.h>
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#import "org_lwjgl_opengl_MacOSXContextImplementation.h"
|
||||
#import "context.h"
|
||||
|
|
@ -78,6 +81,16 @@ JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_MacOSXContextImplementation_nCre
|
|||
return context_handle;
|
||||
}
|
||||
|
||||
JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_MacOSXContextImplementation_getCGLShareGroup
|
||||
(JNIEnv *env, jclass clazz, jobject context_handle) {
|
||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||
MacOSXContext *context_info = (MacOSXContext *)(*env)->GetDirectBufferAddress(env, context_handle);
|
||||
CGLContextObj cgl_context = [context_info->context CGLContextObj];
|
||||
CGLShareGroupObj share_group = CGLGetShareGroup(cgl_context);
|
||||
[pool release];
|
||||
return share_group;
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXContextImplementation_nSwapBuffers
|
||||
(JNIEnv *env, jclass clazz, jobject context_handle) {
|
||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue