From 4d5f244f23851c38296a15ef8ef0596570b614f5 Mon Sep 17 00:00:00 2001 From: Brian Matzon Date: Fri, 5 Mar 2004 22:20:10 +0000 Subject: [PATCH] osx fixes - needs verification --- src/native/common/extgl.cpp | 2 +- src/native/macosx/org_lwjgl_opengl_Pbuffer.cpp | 1 + src/native/macosx/org_lwjgl_opengl_Window.cpp | 9 +++++++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/native/common/extgl.cpp b/src/native/common/extgl.cpp index d358e5ac..527c8a7c 100755 --- a/src/native/common/extgl.cpp +++ b/src/native/common/extgl.cpp @@ -719,7 +719,7 @@ void *extgl_GetProcAddress(const char *name) #endif #ifdef _AGL - CFStringRef str = CFStringCreateWithCStringNoCopy(NULL, name, kCFStringEncodingUTF8, kCFAllocatorNULL); + CFStringRef str = CFStringCreateWithCStringNoCopy(NULL, name, kCFStringEncodingUTF8, kCFAllocatorNull); void *func_pointer = CFBundleGetFunctionPointerForName(opengl_bundle_ref, str); if (func_pointer == NULL) { func_pointer = CFBundleGetFunctionPointerForName(agl_bundle_ref, str); diff --git a/src/native/macosx/org_lwjgl_opengl_Pbuffer.cpp b/src/native/macosx/org_lwjgl_opengl_Pbuffer.cpp index b120105f..911e3173 100644 --- a/src/native/macosx/org_lwjgl_opengl_Pbuffer.cpp +++ b/src/native/macosx/org_lwjgl_opengl_Pbuffer.cpp @@ -42,6 +42,7 @@ #include "org_lwjgl_opengl_Pbuffer.h" #include "extgl.h" #include +#include "common_tools.h" JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_Pbuffer_nIsBufferLost(JNIEnv *env, jclass clazz, jint handle) { return JNI_FALSE; diff --git a/src/native/macosx/org_lwjgl_opengl_Window.cpp b/src/native/macosx/org_lwjgl_opengl_Window.cpp index 29a68321..0c93ef08 100644 --- a/src/native/macosx/org_lwjgl_opengl_Window.cpp +++ b/src/native/macosx/org_lwjgl_opengl_Window.cpp @@ -101,17 +101,19 @@ JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_Window_nIsCloseRequested(JNIEnv return JNI_FALSE; } -JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Window_nCreate(JNIEnv *env, jclass clazz, jstring title, jint x, jint y, jint width, jint height, jboolean fullscreen, jint bpp, jint alpha, jint depth, jint stencil, jint samples, jobject ext_set) { +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Window_nCreate(JNIEnv *env, jclass clazz, jstring title, jint x, jint y, jint width, jint height, jboolean fullscreen, jint bpp, jint alpha, jint depth, jint stencil, jint samples) { vsync_enabled = false; current_fullscreen = fullscreen == JNI_TRUE; if (!extgl_Open()) { throwException(env, "Could not load gl library"); return; } + /* + WARNING COMMENTED OUT, to make compile, needed?, fix? if (!extgl_InitAGL(env, ext_set)) { throwException(env, "Could not load agl symbols"); return; - } + }*/ if (!current_fullscreen) { if (!switchToNearestMode(env, width, height, bpp, 60)) { destroyMode(env, clazz); @@ -125,11 +127,14 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Window_nCreate(JNIEnv *env, jclass extgl_Close(); return; } + /* + WARNING COMMENTED OUT, to make compile, needed?, fix? if (!extgl_Initialize(env, ext_set)) { destroy(env, clazz); throwException(env, "Could not load gl function pointers"); return; } + */ FlushEventQueue(GetMainEventQueue()); }