osx fixes - needs verification

This commit is contained in:
Brian Matzon 2004-03-05 22:20:10 +00:00
parent 55544a36f3
commit 4d5f244f23
3 changed files with 9 additions and 3 deletions

View File

@ -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);

View File

@ -42,6 +42,7 @@
#include "org_lwjgl_opengl_Pbuffer.h"
#include "extgl.h"
#include <OpenGL/OpenGL.h>
#include "common_tools.h"
JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_Pbuffer_nIsBufferLost(JNIEnv *env, jclass clazz, jint handle) {
return JNI_FALSE;

View File

@ -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());
}