From: <wj...@Th...> - 2001-10-03 15:23:19
|
I'm a novice to GL4Java (pretty new to GL in for that matter). I tried to run some of the GLJPanel samples, and I can't get any of them to run successfully. I am successfully using GLCanvas. I am trying to get the GLJPanel working on Windows. I'm using Windows 2000. I can get create a GLContext successfully, but the native call to gljMakeCurrent fails. I compiled all the native code and poked around in a bit, and it seems to me that something is missing in the Windows version of Java_gl4java_GLContext_gljMakeCurrentNative. The line it dies on is: if ( ret==JNI_TRUE && !disp__wglMakeCurrent(GET_USED_WINDOW(thisWin), (HGLRC)((PointerHolder)glContext)) ) The first parameter is 0. It appears to be that dsi_win is initialized to NULL in the jawt_create_offscreen call, and it is never set to anything else. The only chance it would get to be changed is in jawt_lock, but since dsi_win_created is never updated anywhere, it's initial value of 1 remains unchanged, and dsi_win is never set. It is actually set in gljDestroyNative, but I don't think that helps here... This is a bit different from the X11 code though. It has this code: if(ownwind || joffScreenRenderer==JNI_TRUE) { pData->dsi_win=(void *)(PointerHolder)theWindow; pData->dsi_win_created=1; } So, here are some questions: 1 - Has anyone run the GLJPanel samples under Windows? 2 - How does dsi_win get updated if dsi_win_created is never changed? Thanks in advance! Bill K |