diff options
author | Chien Yang <[email protected]> | 2007-04-30 21:51:21 +0000 |
---|---|---|
committer | Chien Yang <[email protected]> | 2007-04-30 21:51:21 +0000 |
commit | 6e5336b338f378139803076ca7c10f37a7ff4cd8 (patch) | |
tree | bb5ed2cde8c2d3628fba90f3f0d5e30d36e9c43c /src | |
parent | fa4a7c3930e36c5651aab9608c53daab5bd2e32c (diff) |
Fix to Issse 486 : Java 3D hangs on some Windows Vista systems
git-svn-id: https://svn.java.net/svn/j3d-core~svn/trunk@836 ba19aa83-45c5-6ac9-afd3-db810772062c
Diffstat (limited to 'src')
-rw-r--r-- | src/native/ogl/Canvas3D.c | 10 | ||||
-rw-r--r-- | src/native/ogl/NativeConfigTemplate3D.c | 8 | ||||
-rw-r--r-- | src/native/ogl/NativeScreenInfo.c | 4 | ||||
-rw-r--r-- | src/native/ogl/OglCheck.c | 2 |
4 files changed, 12 insertions, 12 deletions
diff --git a/src/native/ogl/Canvas3D.c b/src/native/ogl/Canvas3D.c index fd0d7b9..1e053b6 100644 --- a/src/native/ogl/Canvas3D.c +++ b/src/native/ogl/Canvas3D.c @@ -2311,8 +2311,8 @@ jlong JNICALL Java_javax_media_j3d_NativePipeline_createOffScreenBuffer( if (!wglMakeCurrent(hdc, hrc)) { printErrorMessage("In Canvas3D : Failed in wglMakeCurrent"); - ReleaseDC(hwnd, hdc); wglDeleteContext(hrc); + ReleaseDC(hwnd, hdc); DestroyWindow(hwnd); UnregisterClass(szAppName, (HINSTANCE)NULL); return 0; @@ -2329,8 +2329,8 @@ jlong JNICALL Java_javax_media_j3d_NativePipeline_createOffScreenBuffer( width, height, piAttrs); if(hpbuf == NULL) { printErrorMessage("In Canvas3D : wglCreatePbufferARB FAIL."); - ReleaseDC(hwnd, hdc); wglDeleteContext(hrc); + ReleaseDC(hwnd, hdc); DestroyWindow(hwnd); UnregisterClass(szAppName, (HINSTANCE)NULL); return 0; @@ -2340,8 +2340,8 @@ jlong JNICALL Java_javax_media_j3d_NativePipeline_createOffScreenBuffer( if(hpbufdc == NULL) { printErrorMessage("In Canvas3D : Can't get pbuffer's device context."); - ReleaseDC(hwnd, hdc); wglDeleteContext(hrc); + ReleaseDC(hwnd, hdc); DestroyWindow(hwnd); UnregisterClass(szAppName, (HINSTANCE)NULL); return 0; @@ -2354,8 +2354,8 @@ jlong JNICALL Java_javax_media_j3d_NativePipeline_createOffScreenBuffer( */ /* Destroy all dummy objects */ - ReleaseDC(hwnd, hdc); wglDeleteContext(hrc); + ReleaseDC(hwnd, hdc); DestroyWindow(hwnd); UnregisterClass(szAppName, (HINSTANCE)NULL); @@ -2409,8 +2409,8 @@ jlong JNICALL Java_javax_media_j3d_NativePipeline_createOffScreenBuffer( /* Choosing and setting of pixel format is done in createContext */ /* Destroy all dummy objects and fall BitMap */ - ReleaseDC(hwnd, hdc); wglDeleteContext(hrc); + ReleaseDC(hwnd, hdc); DestroyWindow(hwnd); UnregisterClass(szAppName, (HINSTANCE)NULL); diff --git a/src/native/ogl/NativeConfigTemplate3D.c b/src/native/ogl/NativeConfigTemplate3D.c index c042120..bae85db 100644 --- a/src/native/ogl/NativeConfigTemplate3D.c +++ b/src/native/ogl/NativeConfigTemplate3D.c @@ -1474,8 +1474,8 @@ jint JNICALL Java_javax_media_j3d_NativeConfigTemplate3D_choosePixelFormat( if (!wglMakeCurrent(hdc, hrc)) { printErrorMessage("In NativeConfigTemplate : Failed in wglMakeCurrent"); - ReleaseDC(hwnd, hdc); wglDeleteContext(hrc); + ReleaseDC(hwnd, hdc); DestroyWindow(hwnd); UnregisterClass(szAppName, (HINSTANCE)NULL); return -1; @@ -1557,8 +1557,8 @@ jint JNICALL Java_javax_media_j3d_NativeConfigTemplate3D_choosePixelFormat( (*env)->ReleaseLongArrayElements(env, offScreenPFArray, offScreenPFListPtr, 0); /* Destroy all dummy objects */ - ReleaseDC(hwnd, hdc); wglDeleteContext(hrc); + ReleaseDC(hwnd, hdc); DestroyWindow(hwnd); UnregisterClass(szAppName, (HINSTANCE)NULL); @@ -1598,8 +1598,8 @@ jint JNICALL Java_javax_media_j3d_NativeConfigTemplate3D_choosePixelFormat( (*env)->ReleaseLongArrayElements(env, offScreenPFArray, offScreenPFListPtr, 0); /* We are done with dummy context, so destroy all dummy objects */ - ReleaseDC(hwnd, hdc); wglDeleteContext(hrc); + ReleaseDC(hwnd, hdc); DestroyWindow(hwnd); UnregisterClass(szAppName, (HINSTANCE)NULL); @@ -1623,8 +1623,8 @@ jint JNICALL Java_javax_media_j3d_NativeConfigTemplate3D_choosePixelFormat( (*env)->ReleaseLongArrayElements(env, offScreenPFArray, offScreenPFListPtr, 0); /* We are done with dummy context, so destroy all dummy objects */ - ReleaseDC(hwnd, hdc); wglDeleteContext(hrc); + ReleaseDC(hwnd, hdc); DestroyWindow(hwnd); UnregisterClass(szAppName, (HINSTANCE)NULL); diff --git a/src/native/ogl/NativeScreenInfo.c b/src/native/ogl/NativeScreenInfo.c index d0a2ce3..64396de 100644 --- a/src/native/ogl/NativeScreenInfo.c +++ b/src/native/ogl/NativeScreenInfo.c @@ -203,8 +203,8 @@ Java_javax_media_j3d_NativeScreenInfo_queryWglARB( if (!wglMakeCurrent(hdc, hrc)) { printErrorMessage("Failed in wglMakeCurrent"); - ReleaseDC(hwnd, hdc); wglDeleteContext(hrc); + ReleaseDC(hwnd, hdc); DestroyWindow(hwnd); UnregisterClass(szAppName, (HINSTANCE)NULL); return JNI_FALSE; @@ -231,8 +231,8 @@ Java_javax_media_j3d_NativeScreenInfo_queryWglARB( } } - ReleaseDC(hwnd, hdc); wglDeleteContext(hrc); + ReleaseDC(hwnd, hdc); DestroyWindow(hwnd); UnregisterClass(szAppName, (HINSTANCE)NULL); return JNI_TRUE; diff --git a/src/native/ogl/OglCheck.c b/src/native/ogl/OglCheck.c index 866612c..d72626d 100644 --- a/src/native/ogl/OglCheck.c +++ b/src/native/ogl/OglCheck.c @@ -391,8 +391,8 @@ Java_javax_media_j3d_NativePipeline_getSupportedOglVendorNative( } /* Destroy all dummy objects */ - ReleaseDC(hwnd, hdc); wglDeleteContext(hrc); + ReleaseDC(hwnd, hdc); DestroyWindow(hwnd); UnregisterClass(szAppName, (HINSTANCE)NULL); |