mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-11 02:43:58 +02:00
OpenGL JNI Canvas compiled only when needed
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
#ifdef USE_JNI
|
||||
#import <jawt_md.h>
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
@@ -30,4 +31,5 @@ extern "C" {
|
||||
JNIEXPORT void JNICALL Java_OpenGLCanvas_releaseOpenGL(JNIEnv *env, jobject canvas);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
@@ -1,3 +1,4 @@
|
||||
#ifdef USE_JNI
|
||||
#include "OpenGLCanvasMacOS.h"
|
||||
|
||||
static jfieldID ctxID = NULL;
|
||||
@@ -164,4 +165,5 @@ JNIEXPORT void JNICALL Java_OpenGLCanvas_releaseOpenGL(JNIEnv *env, jobject canv
|
||||
}
|
||||
|
||||
freeContext(env, canvas, ci);
|
||||
}
|
||||
}
|
||||
#endif
|
Reference in New Issue
Block a user