Various linux fixes(alot)

This commit is contained in:
Elias Naur 2003-03-27 18:27:36 +00:00
parent 33439a63d4
commit 8343bfa44c
2 changed files with 10 additions and 4 deletions

View File

@ -279,6 +279,7 @@ JNIEXPORT jboolean JNICALL Java_org_lwjgl_Display_nCreate(JNIEnv * env, jclass c
}
screen = DefaultScreen(disp);
if (!loadGL(disp, screen)) {
XCloseDisplay(disp);
#ifdef _DEBUG
printf("Could not load GL libs\n");
#endif

View File

@ -65,6 +65,7 @@ static void releaseContext(void) {
JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_BaseGL_nCreate
(JNIEnv * env, jobject obj)
{
printf("1\n");
if (disp == NULL) {
#ifdef _DEBUG
printf("No display\n");
@ -77,7 +78,9 @@ JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_BaseGL_nCreate
#endif
return JNI_FALSE;
}
printf("2\n");
context = glXCreateContext(disp, getVisualInfo(), NULL, True);
printf("3\n");
if (context == NULL) {
#ifdef _DEBUG
printf("Could not create context\n");
@ -85,7 +88,9 @@ JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_BaseGL_nCreate
return JNI_FALSE;
}
printf("4\n");
makeCurrent();
printf("5\n");
if (extgl_Initialize() != 0) {
#ifdef _DEBUG
printf("Could not init gl function pointers\n");
@ -135,10 +140,10 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_BaseGL_nMakeCurrent
}
/*
* * Class: org_lwjgl_opengl_BaseGL
* * Method: nFreeContext
* * Signature: ()V
* */
* Class: org_lwjgl_opengl_BaseGL
* Method: nFreeContext
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_org_lwjgl_opengl_BaseGL_nReleaseContext
(JNIEnv *, jobject)
{