< prev index next >

src/java.desktop/windows/native/libawt/java2d/d3d/D3DGraphicsDevice.cpp

Print this page




 161     w = (AwtWindow *)AwtComponent::GetComponent((HWND)window);
 162     if (w == NULL || !::IsWindow(hWnd = w->GetTopLevelHWnd())) {
 163         J2dTraceLn(J2D_TRACE_WARNING,
 164                    "D3DGD_enterFullScreenExclusiveNative: disposed window");
 165         return JNI_FALSE;
 166     }
 167 
 168     // REMIND: should we also move the non-topleve window from
 169     // being on top here (it's moved to front in GraphicsDevice.setFSW())?
 170 
 171     pCtx->Get3DObject()->GetAdapterDisplayMode(adapter, &dm);
 172     pCurParams = pCtx->GetPresentationParams();
 173 
 174     // let the mananger know that we're entering the fs mode, it will
 175     // set the proper current focus window for us, which ConfigureContext will
 176     // use when creating the device
 177     pMgr->SetFSFocusWindow(adapter, hWnd);
 178 
 179     newParams = *pCurParams;
 180     newParams.hDeviceWindow = hWnd;
 181     newParams.Windowed = FALSE;


 182     newParams.BackBufferCount = 1;
 183     newParams.BackBufferFormat = dm.Format;
 184     newParams.FullScreen_RefreshRateInHz = dm.RefreshRate;
 185     newParams.BackBufferWidth = dm.Width;
 186     newParams.BackBufferHeight = dm.Height;
 187     newParams.PresentationInterval = D3DPRESENT_INTERVAL_DEFAULT;
 188     newParams.SwapEffect = D3DSWAPEFFECT_DISCARD;
 189 
 190     res = pCtx->ConfigureContext(&newParams);
 191     D3DRQ_MarkLostIfNeeded(res, D3DRQ_GetCurrentDestination());
 192     return SUCCEEDED(res);
 193 }
 194 
 195 /*
 196  * Class:     sun_java2d_d3d_D3DGraphicsDevice
 197  * Method:    exitFullScreenExclusiveNative
 198  * Signature: (I)V
 199  */
 200 JNIEXPORT jboolean JNICALL
 201 Java_sun_java2d_d3d_D3DGraphicsDevice_exitFullScreenExclusiveNative




 161     w = (AwtWindow *)AwtComponent::GetComponent((HWND)window);
 162     if (w == NULL || !::IsWindow(hWnd = w->GetTopLevelHWnd())) {
 163         J2dTraceLn(J2D_TRACE_WARNING,
 164                    "D3DGD_enterFullScreenExclusiveNative: disposed window");
 165         return JNI_FALSE;
 166     }
 167 
 168     // REMIND: should we also move the non-topleve window from
 169     // being on top here (it's moved to front in GraphicsDevice.setFSW())?
 170 
 171     pCtx->Get3DObject()->GetAdapterDisplayMode(adapter, &dm);
 172     pCurParams = pCtx->GetPresentationParams();
 173 
 174     // let the mananger know that we're entering the fs mode, it will
 175     // set the proper current focus window for us, which ConfigureContext will
 176     // use when creating the device
 177     pMgr->SetFSFocusWindow(adapter, hWnd);
 178 
 179     newParams = *pCurParams;
 180     newParams.hDeviceWindow = hWnd;
 181     // Since we are not creating hwnd with WS_EX_TOPMOST flag, so Windowed flag 
 182     // needs to be TRUE for fullscreen window 
 183     newParams.Windowed = TRUE;  
 184     newParams.BackBufferCount = 1;
 185     newParams.BackBufferFormat = dm.Format;
 186     newParams.FullScreen_RefreshRateInHz = dm.RefreshRate;
 187     newParams.BackBufferWidth = dm.Width;
 188     newParams.BackBufferHeight = dm.Height;
 189     newParams.PresentationInterval = D3DPRESENT_INTERVAL_DEFAULT;
 190     newParams.SwapEffect = D3DSWAPEFFECT_DISCARD;
 191 
 192     res = pCtx->ConfigureContext(&newParams);
 193     D3DRQ_MarkLostIfNeeded(res, D3DRQ_GetCurrentDestination());
 194     return SUCCEEDED(res);
 195 }
 196 
 197 /*
 198  * Class:     sun_java2d_d3d_D3DGraphicsDevice
 199  * Method:    exitFullScreenExclusiveNative
 200  * Signature: (I)V
 201  */
 202 JNIEXPORT jboolean JNICALL
 203 Java_sun_java2d_d3d_D3DGraphicsDevice_exitFullScreenExclusiveNative


< prev index next >