diff options
author | Alessandro Borges <[email protected]> | 2006-01-02 18:34:23 +0000 |
---|---|---|
committer | Alessandro Borges <[email protected]> | 2006-01-02 18:34:23 +0000 |
commit | aba03a7bd1b677934f5b2a5be80f3bc0885450af (patch) | |
tree | a6947a62a8f08c58c84824b55b1d4165a642a80d /src | |
parent | b8465027bb9529ff871c554950b0d6a2a91062b6 (diff) |
line break fix.
git-svn-id: https://svn.java.net/svn/j3d-core~svn/trunk@485 ba19aa83-45c5-6ac9-afd3-db810772062c
Diffstat (limited to 'src')
-rw-r--r-- | src/native/d3d/GraphicsContext3D.cpp | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/src/native/d3d/GraphicsContext3D.cpp b/src/native/d3d/GraphicsContext3D.cpp index fc33970..6d53a83 100644 --- a/src/native/d3d/GraphicsContext3D.cpp +++ b/src/native/d3d/GraphicsContext3D.cpp @@ -46,19 +46,22 @@ void JNICALL Java_javax_media_j3d_GraphicsContext3D_readRasterNative( // it works. && ((d3dCtx->frontSurface != NULL) || (d3dCtx->frontSurface == NULL) && - d3dCtx->createFrontBuffer())) { + d3dCtx->createFrontBuffer())) + { HRESULT hr = device->GetFrontBufferData(0,d3dCtx->frontSurface);//iSwapChain as 0 - if (FAILED(hr)) { - printf("GetFrontBuffer fail %s\n", DXGetErrorString9(hr)); - return; + if (FAILED(hr)) + { + printf("GetFrontBuffer fail %s\n", DXGetErrorString9(hr)); + return; } byteData = (jbyte *) env->GetPrimitiveArrayCritical(byteData_array, NULL); - if (!d3dCtx->bFullScreen) { + if (!d3dCtx->bFullScreen) + { // We need to invoke GetWindowRect() everytime // since message resize() will not receive // when Canvas3D inside browers. @@ -70,12 +73,16 @@ void JNICALL Java_javax_media_j3d_GraphicsContext3D_readRasterNative( hRaster, byteData, d3dCtx->frontSurface); - } else { - copyDataFromSurface(format, xOffset, yOffset, + } + else + { + copyDataFromSurface(format, xOffset, yOffset, wRaster, hRaster, byteData, d3dCtx->frontSurface); } - } else { + } + else + { if (d3dCtx->backSurface == NULL) { HRESULT hr = device->GetBackBuffer(0,0, D3DBACKBUFFER_TYPE_MONO, //isSwapChain as 0 &d3dCtx->backSurface); @@ -84,15 +91,12 @@ void JNICALL Java_javax_media_j3d_GraphicsContext3D_readRasterNative( return; } } - byteData = (jbyte *) - env->GetPrimitiveArrayCritical(byteData_array, NULL); + byteData = (jbyte *)env->GetPrimitiveArrayCritical(byteData_array, NULL); copyDataFromSurface(format, xOffset, yOffset, wRaster, hRaster, byteData, d3dCtx->backSurface); } - - env->ReleasePrimitiveArrayCritical(byteData_array, byteData, 0); } |