macosx compile fix
This commit is contained in:
parent
925139bc7d
commit
c90625eb1f
|
@ -75,7 +75,7 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_makePbufferCurrent(JN
|
||||||
[pool release];
|
[pool release];
|
||||||
}
|
}
|
||||||
|
|
||||||
static void createPbuffer(JNIEnv *env, jobject pbuffer_handle, jint width, jint height, jobject pixel_format, NSOpenGLContext shared_context) {
|
static void createPbuffer(JNIEnv *env, jobject pbuffer_handle, jint width, jint height, jobject pixel_format, NSOpenGLContext *shared_context) {
|
||||||
if (!checkCapacity(env, pbuffer_handle))
|
if (!checkCapacity(env, pbuffer_handle))
|
||||||
return;
|
return;
|
||||||
NSOpenGLPixelBuffer *pbuffer = [[NSOpenGLPixelBuffer alloc] initWithTextureTarget:GL_TEXTURE_2D textureInternalFormat:GL_RGBA textureMaxMipMapLevel:0 pixelsWide:width pixelsHigh:height];
|
NSOpenGLPixelBuffer *pbuffer = [[NSOpenGLPixelBuffer alloc] initWithTextureTarget:GL_TEXTURE_2D textureInternalFormat:GL_RGBA textureMaxMipMapLevel:0 pixelsWide:width pixelsHigh:height];
|
||||||
|
@ -87,8 +87,8 @@ static void createPbuffer(JNIEnv *env, jobject pbuffer_handle, jint width, jint
|
||||||
if (context == nil)
|
if (context == nil)
|
||||||
return;
|
return;
|
||||||
int screen;
|
int screen;
|
||||||
if (display_context != NULL)
|
if (getDisplayContext() != NULL)
|
||||||
screen = [display_context currentVirtualScreen];
|
screen = [getDisplayContext() currentVirtualScreen];
|
||||||
else
|
else
|
||||||
screen = 0;
|
screen = 0;
|
||||||
[context setPixelBuffer:pbuffer cubeMapFace:0 mipMapLevel:0 currentVirtualScreen:screen];
|
[context setPixelBuffer:pbuffer cubeMapFace:0 mipMapLevel:0 currentVirtualScreen:screen];
|
||||||
|
@ -99,7 +99,7 @@ static void createPbuffer(JNIEnv *env, jobject pbuffer_handle, jint width, jint
|
||||||
|
|
||||||
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_nCreatePbuffer(JNIEnv *env, jobject this, jobject pbuffer_handle, jint width, jint height, jobject pixel_format, jobject pixelFormatCaps, jobject pBufferAttribs, jobject shared_context_handle_buffer) {
|
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_nCreatePbuffer(JNIEnv *env, jobject this, jobject pbuffer_handle, jint width, jint height, jobject pixel_format, jobject pixelFormatCaps, jobject pBufferAttribs, jobject shared_context_handle_buffer) {
|
||||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||||
NSOpenGLContext shared_context = getDisplayContext();
|
NSOpenGLContext *shared_context = getDisplayContext();
|
||||||
if (shared_context_handle_buffer != NULL) {
|
if (shared_context_handle_buffer != NULL) {
|
||||||
PbufferInfo *pbuffer_handle_ptr = (PbufferInfo *)(*env)->GetDirectBufferAddress(env, shared_context_handle_buffer);
|
PbufferInfo *pbuffer_handle_ptr = (PbufferInfo *)(*env)->GetDirectBufferAddress(env, shared_context_handle_buffer);
|
||||||
shared_context = pbuffer_handle_ptr->context;
|
shared_context = pbuffer_handle_ptr->context;
|
||||||
|
|
Loading…
Reference in New Issue