osx fixes - needs verification
This commit is contained in:
parent
55544a36f3
commit
4d5f244f23
|
@ -719,7 +719,7 @@ void *extgl_GetProcAddress(const char *name)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _AGL
|
#ifdef _AGL
|
||||||
CFStringRef str = CFStringCreateWithCStringNoCopy(NULL, name, kCFStringEncodingUTF8, kCFAllocatorNULL);
|
CFStringRef str = CFStringCreateWithCStringNoCopy(NULL, name, kCFStringEncodingUTF8, kCFAllocatorNull);
|
||||||
void *func_pointer = CFBundleGetFunctionPointerForName(opengl_bundle_ref, str);
|
void *func_pointer = CFBundleGetFunctionPointerForName(opengl_bundle_ref, str);
|
||||||
if (func_pointer == NULL) {
|
if (func_pointer == NULL) {
|
||||||
func_pointer = CFBundleGetFunctionPointerForName(agl_bundle_ref, str);
|
func_pointer = CFBundleGetFunctionPointerForName(agl_bundle_ref, str);
|
||||||
|
|
|
@ -42,6 +42,7 @@
|
||||||
#include "org_lwjgl_opengl_Pbuffer.h"
|
#include "org_lwjgl_opengl_Pbuffer.h"
|
||||||
#include "extgl.h"
|
#include "extgl.h"
|
||||||
#include <OpenGL/OpenGL.h>
|
#include <OpenGL/OpenGL.h>
|
||||||
|
#include "common_tools.h"
|
||||||
|
|
||||||
JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_Pbuffer_nIsBufferLost(JNIEnv *env, jclass clazz, jint handle) {
|
JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_Pbuffer_nIsBufferLost(JNIEnv *env, jclass clazz, jint handle) {
|
||||||
return JNI_FALSE;
|
return JNI_FALSE;
|
||||||
|
|
|
@ -101,17 +101,19 @@ JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_Window_nIsCloseRequested(JNIEnv
|
||||||
return JNI_FALSE;
|
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;
|
vsync_enabled = false;
|
||||||
current_fullscreen = fullscreen == JNI_TRUE;
|
current_fullscreen = fullscreen == JNI_TRUE;
|
||||||
if (!extgl_Open()) {
|
if (!extgl_Open()) {
|
||||||
throwException(env, "Could not load gl library");
|
throwException(env, "Could not load gl library");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
WARNING COMMENTED OUT, to make compile, needed?, fix?
|
||||||
if (!extgl_InitAGL(env, ext_set)) {
|
if (!extgl_InitAGL(env, ext_set)) {
|
||||||
throwException(env, "Could not load agl symbols");
|
throwException(env, "Could not load agl symbols");
|
||||||
return;
|
return;
|
||||||
}
|
}*/
|
||||||
if (!current_fullscreen) {
|
if (!current_fullscreen) {
|
||||||
if (!switchToNearestMode(env, width, height, bpp, 60)) {
|
if (!switchToNearestMode(env, width, height, bpp, 60)) {
|
||||||
destroyMode(env, clazz);
|
destroyMode(env, clazz);
|
||||||
|
@ -125,11 +127,14 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_Window_nCreate(JNIEnv *env, jclass
|
||||||
extgl_Close();
|
extgl_Close();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
|
WARNING COMMENTED OUT, to make compile, needed?, fix?
|
||||||
if (!extgl_Initialize(env, ext_set)) {
|
if (!extgl_Initialize(env, ext_set)) {
|
||||||
destroy(env, clazz);
|
destroy(env, clazz);
|
||||||
throwException(env, "Could not load gl function pointers");
|
throwException(env, "Could not load gl function pointers");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
FlushEventQueue(GetMainEventQueue());
|
FlushEventQueue(GetMainEventQueue());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue